title: knex insert multiple rows
body: <p>I have a problem inserting many rows into postgres db with knex.
  I have dynamic number of rows needed to be inserted. The result i expect is:</p>
  
  <p>insert row four times (four is for an example. I dont know exact number of inserts as it comes dynamically from frontend):</p>
  
  <ul>
  <li><strong>field_id</strong> will be diffrent in every row: (1,2,3,4) - i have array of these ID's</li>
  <li><strong>id_of_product</strong> will be always the same</li>
  <li><strong>value</strong> will be always diffrent: (req.body[id] that comes from Frontend) - ID in brackets is same value as the <strong>field_id</strong> from an
  array</li>
  </ul>
  
  <p>How i can achieve that? I tried looping it with forEach, but it's async operation so i can't use .then() as it will be called four times</p>
  
  <p>Here's what i tried. i dont know how to set field_id and req.body to take it dynamically.</p>
  
  <p>fields = [1,2,3,4]</p>
  
  <p>Expected result:</p>
  
  <p>knex creates 4 inserts as follows:
  <strong>field_id:</strong> 1,
  <strong>product_id:</strong> some static id
  <strong>value:</strong> frontValue[1]
  ETC</p>
  
  <pre><code>knex('metadata').insert(
   [{ field_id: fields, 
      product_id: product_id, 
      value: req.body[fields] 
   }]
  )
  </code></pre>