title: Lodash - How to merge two arrays of objects based on key?
body: <p>I'm trying to concat two arrays of objects with lodash. I have these two array and I use concat operator in this way:</p>
  <pre><code> var array1 = [{ id: 1, name: 'doc1' }, { id: 2, name: 'doc2' }];
   var array2 = [{id:1, name:'doc1'}, {id:3, name:'doc3'}, {id:4, name:'doc4'}];
  
   var array3 = _.concat(array1, array2);
  </code></pre>
  <p>I would like an array like this</p>
  <pre><code> [{id:1, name:'doc1'}, {id:2, name:'doc2'}, {id:3, name:'doc3'}, {id:4, name:'doc4'}]]
  </code></pre>
  <p>But with concat function I obtain an array like this:</p>
  <pre><code>  [{ id: 1, name: 'doc1' }, { id: 1, name: 'doc1' }, { id: 2, name: 'doc2' }, { id: 3, name: 'doc3' }, { id: 4, name: 'doc4' }]]
  </code></pre>
  <p>I want to avoid the repetition of an object with the same id...Which kind of operator can I use?</p>