I have a php array that outputs a json like this:
"extraDetails":[
{
"basic":{
"0":{
"id":"101"
},
"1":{
"details":"176381954"
},
"16":{
"birth_date":"1\/15\/1973"
}
]
There are multiple headings like extraDetails. the problem is, I want everything to move one up that has a number. Like so: Basically I want to remove the 0, 1, and 16 and whatever arbitrary number comes from the json.
"extraDetails":[
{
"basic":{
"id":"101"
"idTest":"101"
"idTest2":"101"
},
"details":"176381954"
"MoreDetails":"176381954"
},
"birth_date":"1\/15\/1973"
}
]
UPDATE: This is the array:
array(1) {
basic info=>
array(16) {
[0]=>
array(1) {
["id"]=> string(7) "1798919"
}
[1]=>
array(1) { ["Somevalue"]=>
string(9) "164315268"
}
[16]=>
array(1) {
["Somevalue"]=>
string(9) "2/15/1977"
}
[18]=>
array(1) {
["Somevalue"]=>
string(5) "White"
}
[20]=>
array(1) {
["Somevalue"]=> string(2) "40"
}
UPDATE: This is what I want it to ideally look like:
array(1) {
basic info=>
array(16) {
array(1) {
["id"]=> string(7) "1798919"
}
array(1) { ["Somevalue"]=>
string(9) "164315268"
}
array(1) {
["Somevalue"]=>
string(9) "2/15/1977"
}
array(1) {
["Somevalue"]=>
string(5) "White"
}
array(1) {
["Somevalue"]=> string(2) "40"
}