title: Convert HTML to JSON in react-native
body: <p>I want to convert the HTML I received from a network request to JSON so I can easily read the values.<br />
  <em>If there is a way to read values straight from HTML please let me know in a comment</em><br />
  I have found this library: <a href="https://github.com/andrejewski/himalaya" rel="nofollow noreferrer">https://github.com/andrejewski/himalaya</a><br />
  but when I try to run the example in my app I get the error <code>Cannot read property prototype of undefined</code> so I assume this library doesn't work in react-native because it contains a core Node JS module.<br />
  This was the code:</p>
  <pre><code>import {parse} from 'himalaya'
  const html = this.state.html
  const json = parse(html)
  console.log('', json)
  </code></pre>
  <p>Some example html could be:</p>
  <pre><code>&lt;div class='post post-featured'&gt;
    &lt;p&gt;Himalaya parsed me...&lt;/p&gt;
    &lt;!-- ...and I liked it. --&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The expected output of this html is:</p>
  <pre><code>[{
    type: 'element',
    tagName: 'div',
    attributes: [{
      key: 'class',
      value: 'post post-featured'
    }],
    children: [{
      type: 'element',
      tagName: 'p',
      attributes: [],
      children: [{
        type: 'text',
        content: 'Himalaya parsed me...'
      }]
    }, {
      type: 'comment',
      content: ' ...and I liked it. '
    }]
  }]
  </code></pre>
  <p>Is there another way/library to convert HTML to JSON in react native?</p>