I want to take the all id values in the json format.
{
"1": {
"name": "test",
"followup": {
"1": {
"id": "98",
"followup": {
"1": {
"id": "93",
"followup": {
"1": {
"id": "174"
},
}
}
}
}
}
}
}
I can achieve this by using nested foreach. But now the 'followup' key is present in 3 but it may came 6,7 so we can't add 6,7 foreach.