title: Convert HTML table to Array (JavaScript)
body: <p>I would like to convert a HTML table to an array. Where every line of the table is a new object.</p>
  
  <p>Here an example of how the array should look like</p>
  
  <pre><code>var aSP2010Feature = [{
      DisplayName: "AccSrvMSysAso",
      Title: "Access Services System Objects",
      ID: "29ea7495-fca1-41c6-8ac1-500c247a036e",
      Scope: "Web",
      Description: blablabla
  },
  {
      DisplayName: "AccSrvRestrictedList",
      Title: "Access Services Restricted List Definition",
      ID: "a4d4ee2c-a6cb-4591-ab0a-21bb5bde92fb",
      Scope: "Web",
      Description: blablabla
  },
  {
      DisplayName: "AccSrvShell",
      Title: "No Title",
      ID: "bcf89eb7-bca1-4589-bdb4-ca27f61a2292",
      Scope: "Web",
      Description: blablabla
  }];
  </code></pre>
  
  <p>Here I have an example of my table. The original table has more than 300 rows.</p>
  
  <pre><code>&lt;table border='1'&gt;&lt;tr&gt;&lt;th&gt;Display Name&lt;/th&gt;&lt;th&gt;Title&lt;/th&gt;&lt;th&gt;Scope&lt;/th&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;
  
  &lt;tr&gt;&lt;td&gt;XmlFormLibrary&lt;/td&gt;&lt;td&gt;XML Form Libraries&lt;/td&gt;&lt;td&gt;Web&lt;/td&gt;&lt;td&gt;00bfea71-1e1d-4562-b56a-f05371bb0115&lt;/td&gt;&lt;td&gt;Provides support for XML form libraries for a site.&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;LinksList&lt;/td&gt;&lt;td&gt;Links Lists&lt;/td&gt;&lt;td&gt;Web&lt;/td&gt;&lt;td&gt;00bfea71-2062-426c-90bf-714c59600103&lt;/td&gt;&lt;td&gt;Provides support for links lists for a site.&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;workflowProcessList&lt;/td&gt;&lt;td&gt;WorkflowProcessList Feature&lt;/td&gt;&lt;td&gt;Web&lt;/td&gt;&lt;td&gt;00bfea71-2d77-4a75-9fca-76516689e21a&lt;/td&gt;&lt;td&gt;This feature provides the ability to create a list to support running custom form actions.
  &lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var tdCollection = $("table").find("td");
  var array = [];
  $.each(tdCollection, function(key, el){    
       array.push($(el).text());     
  });
  console.log(array);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table&gt;
  &lt;tr&gt;
  &lt;th&gt;Type&lt;/th&gt;
  &lt;th&gt;Text&lt;/th&gt;
  &lt;th&gt;Time&lt;/th&gt;
  &lt;th&gt;Notification Time&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Lab1&lt;/td&gt;
  &lt;td&gt;Some Text&lt;/td&gt;
  &lt;td&gt;Day of Week&lt;/td&gt;
  &lt;td&gt;Monday, Wednessday&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Lab2&lt;/td&gt;
  &lt;td&gt;Some Text&lt;/td&gt;
  &lt;td&gt;Day of Week&lt;/td&gt;
  &lt;td&gt;Tuesday, Wednessday&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>