i have a json, something like this
{
"a": {
"b1": "blah blah",
"b2": "ahsbefbasef",
"b3": "adsfad af"
},
"c": {
"d1":"asef",
"d2":"fefef",
"d3":"ffgfgf"
}
}
now i want to traverse through this json and get all the nodes-depth wise, as in i want to store nodes with 0 depth(a, c) in one array, nodes with depth 1 (c1,c2,c3,d1,d2,d3) in another array, and so on and so forth, basically breaking json object and storing nodes present at each depth in seperate array
