title: How do I compare and combine two object array into one?
body: <p>I have been stuck trying to implement this forever. do you think you could help me out merging two array objects based on the key <code>PartitionKey</code> and if the <code>PartitionKey</code> don't match up, still add it to the array anyway?</p>
  <pre><code>let arr1 =[
    { PartitionKey: '047', AttributionCount: 61 },
    { PartitionKey: '043', AttributionCount: 136 },
    { PartitionKey: '053', AttributionCount: 36 }
  ];
  
  let arr2 = [
    { PartitionKey: '043', ReportCount: 5 },
    { PartitionKey: '047', ReportCount: 2 },
    { PartitionKey: '045', ReportCount: 2 },
    { PartitionKey: '041', ReportCount: 3 }
  ]
  
  let arr3 = arr1.map((item, i) =&gt; Object.assign({}, item, arr2[i]));
  
  console.log(arr3);
  </code></pre>
  <p>I would like to return the result of</p>
  <pre><code>[
    { PartitionKey: '047', ReportCount: 2, AttributionCount: 61 },
    { PartitionKey: '043', ReportCount: 5, AttributionCount: 136 },
    { PartitionKey: '053', ReportCount: 0, AttributionCount: 36 },
    { PartitionKey: '045', ReportCount: 2, AttributionCount: 0},
    { PartitionKey: '041', ReportCount: 3, AttributionCount: 0}
  ]
  </code></pre>