I have the following API response:
[{
"id": 1
"name": "first Name"
"code": 100
},
{
"id": 2
"name": "second Name"
"code": 200
}]
I would like to re-order the items in the object and move "code" on the top, like this:
[{
"code": 100
"id": 1
"name": "first Name"
},
{
"code": 200
"id": 2
"name": "second Name"
}]