title: Access Array and Object inside JSON
body: <p>I call a get API which returns XML and I was to convert to JSON, but xml2js returns [Object] [Circular] and [Array] inside an Elements Array.
  How can I see what's inside the elements array?</p>
  
  <pre><code>var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
  
  var convert = require('xml-js');
  var request = new XMLHttpRequest();
  request.open("GET", url, true, username, password);
  
  request.withCredentials = true;
  
  request.send();
  request.onreadystatechange=(e)=&gt;{
  
      var obj = convert.xml2js(request.responseText);
  
  console.log(obj);
  </code></pre>
  
  <p>Here's the output: </p>
  
  <pre><code>{ declaration:
      { attributes: { version: '1.0', encoding: 'UTF-8', standalone: 'yes' } },
     elements:
       [ { type: 'element',
           name: 'model-response-list',
           attributes: [Object],
           elements: [Array] } ] }
  </code></pre>