title: Convert HTML table (as a string) into JS Objects array
body: <p>What's a simple/elegant way to convert a string containing the source code of a HTML table into an array of javascript object ?</p>
  
  <p>It would convert each <code>&lt;tr&gt;</code> into an object and each <code>&lt;td&gt;</code> into an object property.</p>
  
  <p>The properties names aren't extracted from the table, they are already defined.</p>
  
  <p>For example, passing this code as a string to the javascript function :</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr&gt;
      &lt;td&gt;2280&lt;/td&gt;
      &lt;td&gt;23020044623&lt;/td&gt;
      &lt;td&gt;RTS&lt;/td&gt;
      &lt;td&gt;EUR&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
      &lt;td&gt;29/07/2015&lt;/td&gt;
      &lt;td&gt;10/07/2017&lt;/td&gt;
      &lt;td&gt;no&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
      &lt;td&gt;2281&lt;/td&gt;
      &lt;td&gt;23020011223&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;GBP&lt;/td&gt;
      &lt;td&gt;0,78&lt;/td&gt;
      &lt;td&gt;10/10/2013&lt;/td&gt;
      &lt;td&gt;10/10/2018&lt;/td&gt;
      &lt;td&gt;Occult&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>would return :</p>
  
  <pre><code>// Properties names are known
  [
  {
      prop1: '2280',
      prop2: '23020044623',
      prop3: 'RTS',
      prop4: 'EUR',
      prop5: '1',
      prop6: '29/07/2015',
      prop7: '10/07/2017',
      prop8: 'no'
  },
  {
      prop1: '2281',
      prop2: '23020011223',
      prop3: '',
      prop4: 'GBP',
      prop5: '0,78',
      prop6: '10/10/2013',
      prop7: '10/10/2018',
      prop8: 'Occult'
  }
  ]
  </code></pre>