title: Moving data from 2 arrays of objects into a third array
body: <p>so assume i have 2 arrays of objects...</p>
  
  <pre><code>let orders = [
     { id: 1, itemName: 'Peaches', amount: 2 },
     { id: 2, itemName: 'Mangoes', amount: 1 },
     { id: 3, itemName: 'Mangoes', amount: 10 }
    ];
  </code></pre>
  
  <pre><code>let items = [
     { id: 1, name: 'Peaches', qty: 10 },
     { id: 2, name: 'Mangoes', qty: 3 }
    ];
  </code></pre>
  
  <p>and i want to find the list of orders for every item and put them in an array called <code>linkedOrders</code>, I tried the below code: </p>
  
  <pre><code>let linkedOrders = _.map(items, item =&gt; _.where(orders, { name: item.name }));
  console.log(linkedOrders);
  </code></pre>
  
  <p>This is what I am getting:</p>
  
  <pre><code>    [{ id: 1, itemName: 'Peaches', amount: 2 }],
      [{ id: 2, itemName: 'Mangoes', amount: 1 },
      { id: 3, itemName: 'Mangoes', amount: 10 }]
  </code></pre>
  
  <p>but I want something like this:</p>
  
  <pre><code>    [{'Peaches': [
         { id: 1, itemName: 'Peaches', amount: 2 }
       ],
       'Mangoes': [
         { id: 2, itemName: 'Mangoes', amount: 1 },
         { id: 3, itemName: 'Mangoes', amount: 10 }
      ]],
  </code></pre>
  
  <p>Any help would be appreciated thanks.</p>