title: Joining two arrays by key name for Angular project
body: <p>I'm pretty new to angular and typescript and I've run into an issue. I have two arrays that I need merged into one based on their category-id. Both arrays include some values that the other does not have. These arrays will change based on user inputs so I have no way of knowing ahead of time what the length of each array will be. I do know that "category-id" will always be included in each array, however, which is why I would like to merge the 2 arrays based on that. Thanks for any help.</p>
  
  <p>Example:</p>
  
  <pre><code>arr1 = [
  {category-id: car, category-value: mustang},    
  {category-id: convertible, category-value: softTop}
  ]
  arr2 = [
  {category-id: car, category-feature: convertible},
  {category-id: truck, category-value: ranger},
  {category-id: convertible, category-feature: blue}
  ]
  </code></pre>
  
  <p>Desired Result:</p>
  
  <pre><code>arr3 = [
  {category-id: car, category-value:mustang, category-feature: convertible},
  {category-id: truck, category-value: ranger},
  {category-id: convertible, category-value: softTop, category-feature: blue}
  ]
  </code></pre>