title: Mapping Array Of Objects By Key
body: <p>I have two arrays created from a reduce method that searches two existing arrays for dates. It then turns those dates into unique object keys.</p>
  <p>The first group is a list of names the second is a set of series of instructions.</p>
  <p>The goal is to combine the two arrays that get formed by finding like object keys and adding the matching list object and insert it into the set of instructions with the object key list.</p>
  <p>For one it makes an array that looks like :</p>
  <pre class="lang-js prettyprint-override"><code>const listObj = [
    {11/20/2020: [{name:'Joe', date:11/20/2020}]},
    {11/26/2020 : [{name:'John', date:11/26/2020}]}
  ]
  </code></pre>
  <p>And this:</p>
  <pre class="lang-js prettyprint-override"><code>const scheduleObj = [
    {11/20/2020: {type:'Federal', date:11/20/2020}},
    {11/26/2020 : {type:'State', date:11/26/2020}}
  ]
  </code></pre>
  <p>The final product that i need would look something like:</p>
  <pre class="lang-js prettyprint-override"><code>const scheduleObj = [
    {11/26/2020 : {
      type: 'State',
      list: [{name:'John', date:11/26/2020}]
    },
    ...
  ]
  </code></pre>
  <p>Where the list is an added key and the array is the array that is associated with the object key</p>
  <p>I have used a messy what looks like <code>lodash</code> method to get this to work, but I figure there has to be some sort of mapping I can do.</p>
  <p>Any Help Would Be Appreciated</p>