title: Merge/Combine two object arrays from different fields
body: <p>I have an array <em><strong>in_cart</strong></em> which has <em>product_id</em>(s) and the <em>amount</em> of the individual items in the cart document</p>
  <pre><code>&quot;in_cart&quot;:[
    {
      &quot;product_id&quot;:&quot;12345&quot;,
      &quot;amount&quot;:2
    }  
  ]
  </code></pre>
  <p>What I want is to do is <strong>insert</strong> the <em>amount</em> field into the <em><strong>details</strong></em> array. <strong>$lookup</strong> operator is done on the product_id so there will always be an equal amount of items in both arrays.</p>
  <pre><code>&quot;details&quot;:[
    {
      &quot;_id&quot;:&quot;12345&quot;,
      &quot;name&quot;:&quot;test&quot;,
      &quot;price&quot;:1110,
      // ...more data...
    }
  ]
  </code></pre>