title: react xml to json parsing & iterating
body: <p>I am using REACT &amp; I want to iterate my XML to read all attributes. But main problem here is all my Nodes are of name "Key". So i am not able to iterate through XML.</p>
  
  <p>1 solution i thought is that if i parse XML to JSON so that I can iterate through JSON object &amp; then able to read all attributes. I even tried xml2json(<a href="https://www.npmjs.com/package/xml2json" rel="nofollow noreferrer">https://www.npmjs.com/package/xml2json</a>). But it is throwing an error on Windows. 
  Can anyone tell it's solution.</p>
  
  <p>Here is my sample XML:</p>
  
  <pre><code>&lt;Main&gt;
  &lt;Key name="a" level="1"&gt;
      &lt;Key name="b" level="2"&gt;
          &lt;Key name="c" level="3"&gt;
              &lt;Key name="d" level="4"&gt;
              &lt;/Key&gt;
          &lt;/Key&gt;
      &lt;/Key&gt;
      &lt;Key name="m" level="2"&gt;
          &lt;Key name="n" level="3"&gt;
          &lt;/Key&gt;
      &lt;/Key&gt;
  &lt;/Key&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks in advance.</p>