title: Get the depth of an object or array
body: <p>I get data something like this and say that I get depth of groups to infinity. </p>
  
  <p><strong>data/group.data.json</strong></p>
  
  <pre><code>module.exports = [
    {
      id: '1',
      title: 'Awesome Group',
      type: '1',
      groups: [
        {
          id: '5',
          title: 'Child in Level Two - A',
          type: '2',
          groups: [
            {
              id: '6',
              title: 'Child in Level Three - A',
              type: '2',
            },
            {
              id: '8',
              title: 'Child in Level Three - B',
              type: '2',
            }
          ]
        },
        {
          id: '7',
          title: 'Child in Level Two - B',
          type: '2',
        }
      ]
    },
    {
      id: '2',
      title: 'Rockers',
      type: '2',
    },
    {
      id: '3',
      title: 'Dazzlers',
      type: '3',
    }
  ];
  </code></pre>
  
  <p>I cannot do this manually like below, How to iterate it till the end dynamically?</p>
  
  <pre><code>&lt;ul class="list-group list-group-flush"&gt;
    &lt;template v-for="group in groupData"&gt;
      &lt;a class="list-group-item" href="#"&gt;
        &lt;h6&gt;{{group.title}}&lt;/h6&gt;
      &lt;/a&gt;
      &lt;template v-for="group in group.groups"&gt;
        &lt;a class="list-group-item pl-40" href="#"&gt;
          &lt;h6&gt;{{group.title}}&lt;/h6&gt;
        &lt;/a&gt;
        &lt;template v-for="group in group.groups"&gt;
          &lt;a class="list-group-item pl-60" href="#"&gt;
            &lt;h6&gt;{{group.title}}&lt;/h6&gt;
          &lt;/a&gt;
        &lt;/template&gt;
      &lt;/template&gt;
    &lt;/template&gt;
  &lt;/ul&gt;
  
  &lt;script&gt;
    let groupData = require('../data/group.data');
  
    export default {
      data () {
        return {
          groupData,
        }
      }
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>There is one answer kinda what I want, but not sure how to use in my case: <a href="https://stackoverflow.com/a/13523953/1292050">https://stackoverflow.com/a/13523953/1292050</a></p>