title: Storing nodes at each level of depth in json object in seperate array
body: <p>i have a json, something like this </p>
  
  <pre><code>{
     "a": {
        "b1": "blah blah",
        "b2": "ahsbefbasef",
        "b3": "adsfad af"
     },
     "c": {
        "d1":"asef",
        "d2":"fefef",
        "d3":"ffgfgf"
     }
  }
  </code></pre>
  
  <p>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 </p>