title: ES6 - Parse HTML string to Array
body: <p>I have an HTML formatted string:</p>
  
  <pre class="lang-js prettyprint-override"><code>let dataString = '&lt;p&gt;Lorem ipsum&lt;/p&gt; &lt;figure&gt;&lt;img src="" alt=""&gt;&lt;/figure&gt; &lt;p&gt;Lorem ipsum 2&lt;/p&gt; &lt;figure&gt;&lt;img src="" alt=""&gt;&lt;/figure&gt;';
  </code></pre>
  
  <p>How can I parse this string to get an array of tags as below?</p>
  
  <pre class="lang-js prettyprint-override"><code>let dataArray = [
    '&lt;p&gt;Lorem ipsum&lt;/p&gt;',
    '&lt;figure&gt;&lt;img src="" alt=""&gt;&lt;/figure&gt;',
    '&lt;p&gt;Lorem ipsum 2&lt;/p&gt;',
    '&lt;figure&gt;&lt;img src="" alt=""&gt;&lt;/figure&gt;',
  ];
  </code></pre>