title: how to convert an array of data into merged html table using nodejs
body: <p>First I get an array of data by <code>SELECT</code>ing from mysql database. The array looks like:</p>
  
  <pre><code>[
  {client:A, day:mon, product_name:product1},
  {client:A, day:mon, product_name:product2},
  {client:A, day:tue, product_name:product3},
  {client:B, day:mon, product_name:product4},
  ]
  </code></pre>
  
  <p>With the array I made a html table that looks like:</p>
  
  <pre><code>client | day | product_name
  ---------------------------
  A      | mon | product_1
  ---------------------------
  A      | mon | product_2
  ---------------------------
  A      | tue | product_3
  ---------------------------
  B      | mon | product_4
  </code></pre>
  
  <p>But instead, I would like to make a merged table like below. How would I do this? I know I have to use rowspan. But since this is a large array, <strong>I am looking for some simple algorithm or npm module that does this for me.</strong><code>(array)=&gt;(html code)</code></p>
  
  <pre><code>client | day | product_name
  ---------------------------
         | mon | product_1
               --------------
  A      |     | product_2
         --------------------
         | tue | product_3
  ---------------------------
  B      | mon | product_4
  </code></pre>