let id = 1, name = 'test name', price = 100
const oldArr = [
{ id, name, price},
{ id, name, price},
{ id, name, price}
]
const newArr = oldArr.map(item => ({
code: item.id,
orderName: item.name,
orderPrice: item.price
}))
console.log(newArr)