title: Parse HTML String to Array
body: <p>I have an html string that contains multiple <code>&lt;p&gt;</code> tags. WIthin each <code>&lt;p&gt;</code> tag there is a word and its definition.</p>
  
  <pre><code>let data = "&lt;p&gt;&lt;strong&gt;Word 1:&lt;/strong&gt; Definition of word 1&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Word 2:&lt;/strong&gt; Definition of word 2&lt;/p&gt;"
  </code></pre>
  
  <p>My goal is to convert this html string into an array of objects that looks like below:</p>
  
  <pre><code>[
   {"word": "Word 1", "definition": "Definition of word 1"},
   {"word": "Word 2", "definition": "Definition of word 2"}
  ]
  </code></pre>
  
  <p>I am doing it as follows:</p>
  
  <pre><code>var parser = new DOMParser();
    var parsedHtml    = parser.parseFromString(data, "text/html");
    let pTags = parsedHtml.getElementsByTagName("p");
    let vocab = []
    pTags.forEach(function(item){
      // This is where I need help to split and convert item into object
      vocab.push(item.innerHTML)
    });
  </code></pre>
  
  <p>As you can see the comment in the above code, that is where I'm stuck. Any help is appreciated.</p>