Here is an example of an API response:
[{
"id": 1,
"name": "first Name",
"code": 100
},
{
"id": 2,
"name": "second Name",
"code": 200
}]
I am looking to rearrange the objects and place the "code" property at the top, resulting in this structure:
[{
"code": 100,
"id": 1,
"name": "first Name"
},
{
"code": 200,
"id": 2,
"name": "second Name"
}]