My sample JSON , I would like to rebuild below json by removing "Child:" Object
{
"Child":{
"DeviceList":[
{
"Child":null,
"DeviceId":"7405618",
"Signal":"-90"
},
{
"Child":{
"DeviceList":[
{
"Child":{
"DeviceList":[
{
"Child":null,
"DeviceId":"3276847",
"Signal":"-86"
}
]
},
"DeviceId":"2293808",
"Signal":""
}
]
},
"DeviceId":"4915247",
"Signal":"-90"
}
]
}
}
New structure should look like this
{
"DeviceList":[
{
"DeviceList":null,
"DeviceId":"7405618",
"Signal":"-90"
},
{
"DeviceList":[
{
"DeviceList":[
{
"DeviceList":null,
"DeviceId":"3276847",
"Signal":"-86"
}
],
"DeviceId":"2293808",
"Signal":""
}
],
"DeviceId":"4915247",
"Signal":"-90"
}
],
"DeviceId":"4915247",
"Signal":"-90"
}
I am looking for a nested recursive solution for a dynamic json tree structure where my JSON content will look like the sample provided.
Childkey?