title: Getting the array name and values in Javacript Object
body: <p>My JSON output is similar to this below object and we have an array values as showing below</p>
  <pre><code>const object1 = {
    &quot;sublists&quot;: {
      &quot;item&quot;: [{
          &quot;line&quot;: &quot;1&quot;,
          &quot;amount&quot;: &quot;1200.00&quot;,
          &quot;id&quot;: &quot;227&quot;,
          &quot;item&quot;: &quot;227&quot;,
          &quot;item_display&quot;: &quot;5800520002800&quot;,
          &quot;quantity&quot;: &quot;1&quot;
        }
      ],
      &quot;shipping&quot;: [{
          &quot;line&quot;: &quot;1&quot;,
          &quot;amount&quot;: &quot;1200.00&quot;,
          &quot;id&quot;: &quot;227&quot;,
          &quot;quantity&quot;: &quot;1&quot;
        }
      ]
    }
  }
  </code></pre>
  <p>I am trying to get the name of arrays and values in separate variable as showing below</p>
  <p>Array name :item, line:  , 1
  Array name :item , amount : 1200
  Array name :item, id : 227
  and so on ...
  the array properties can varry depending on the json ouput  , im looking for a dynamic script in which i could access the array name and properties</p>
  <p>Can someone help me on this ?</p>