My array contains objects with nested objects in each element, structured like this:
[
{
"person": {
"name": "John",
"isActive": true,
"id": 1
}
},
{
"person": {
"name": "Ted",
"isActive": true,
"id": 2
}
}
]
I want to transform it into a format that eliminates the class name, resulting in:
[
{
"Name": "John",
"IsActive": true,
"id": 1
},
{
"Name": "Ted",
"IsActive": true,
"id": 2
}
]
This conversion is necessary for me to efficiently load the data into a Kendo UI grid. The transformation process takes place in a Typescript file.