title: How should I use ejs to render table vertically?
body: <p>I have an array like the following:</p>
  
  <pre><code>quotation: [{
                "dimension" : 0,
                "currency": "RMB",
                "quantity": "100",
                "price": "3",
                "factory": "rx"},
              {
                "dimension" : 0,
                "currency": "RMB",
                "quantity": "200",
                "price": "4",
                "factory": "rx"},
             {
                "dimension" : 1,
                "currency": "RMB",
                "quantity": "100",
                "price": "3",
                "factory": "rx"},
             {
                "dimension" : 1,
                "currency": "RMB",
                "quantity": "200",
                "price": "5",
                "factory": "rx"},
              {
                "dimension" : 0,
                "currency": "RMB",
                "quantity": "100",
                "price": "1.2",
                "factory": "hsf"},
              {
                "dimension" : 0,
                "currency": "RMB",
                "quantity": "200",
                "price": "2.4",
                "factory": "hsf"},
             {
                "dimension" : 1,
                "currency": "RMB",
                "quantity": "100",
                "price": "3",
                "factory": "hsf"},
             {
                "dimension" : 1,
                "currency": "RMB",
                "quantity": "200",
                "price": "4.5",
                "factory": "hsf"}]
  </code></pre>
  
  <p>How should I use ejs to turn into the following table?</p>
  
  <pre><code>&lt;table&gt;
     &lt;tr&gt;
        &lt;th&gt;Dimension&lt;/th&gt;&lt;th&gt;Quantity&lt;/th&gt;&lt;th&gt;Factory: rx&lt;/th&gt;&lt;th&gt;Factory: hsf&lt;/th&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;0&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;1.2&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;0&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;2.4&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;1&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;
     &lt;/tr&gt;
     &lt;tr&gt;
        &lt;td&gt;1&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;5&lt;/td&gt;&lt;td&gt;4.5&lt;/td&gt;
     &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I have to make sure that the price is from the correct factory. I think this problem is easy if html allows me to define table column by column. But html table only allows me to do it row-wise.</p>
  
  <p>Thank you very much for any help.</p>