title: get json max count by key
body: <p>I'm trying to get the maximum number of objects within a key in this case is "child". For each object and sub​​-objects, I want to get to the level achieved by each. Hope you can understand this question. This means a lot to me</p>
  
  <p>For example:</p>
  
  <pre><code>[{
      name:"Node Parent 1 Level 0",
      childs:[{
          name:"Sub Node 1 Level 1",
          childs:[{
              name:"Sub Node 1 Level 2"
          }]
      },{
          name:"Sub Node 2"
      },{
          name:"Sub Node 3"
      }]
  },{
      name:"Node Parent 2 Level 0",
      childs:[{
          name:"Sub Node 1 Level 1",
          childs:[{
              name:"Sub Node 1 Level 2"
          },{
              name:"Sub Node 2 Level 2",
              childs:[{
                  name:"Sub Node 1 Level 3"
              },{
                  name:"Sub Node 2 Level 3",
                  childs:[{
                      name:"Sub Node 1 Level 4"
                  },{
                      name:"Sub Node 2 Level 4"
                  }]
              }]
          }]
      },{
          name:"Sub Node 2 Level 1",
          childs:[{
              name:"Sub Node 1 Level 2"
          },{
              name:"Sub Node 2 Level 2",
              childs:[{
                  name:"Sub Node 1 Level 3"
              },{
                  name:"Sub Node 2 Level 3"
              }]
          }]
      }]
  }]
  </code></pre>