title: Angular2 remove / prevent duplicate records in array
body: <p>I have a component that is subscribed to a <code>subject</code> which is returning employee records and putting them into an array.</p>
  
  <pre><code>importResults: ImportResults[] = [];
  
  constructor(
      private _massEmpService: MassEmpService
  ) {
  }
  
  ngOnInit() {
      // Subscribe to our subject that lets us know about the added employees
      this._massEmpService.importedData.subscribe(obj =&gt; {
          if (obj) {
              // Ensure that we have unique results in our imported data
              this.importResults.push(_.uniqBy(obj, 'QID'));
          }
      });
  }
  </code></pre>
  
  <p>My issue is that each time my button is clicked and this subscription receives data, its pushing the new data along side what is already there instead of ONLY adding records that don't exist.</p>
  
  <p><strong>Here is an example on a single record received (I entered one user name and clicked search)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/hK8bX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hK8bX.png" alt="enter image description here"></a></p>
  
  <p><strong>Here is an example when I add one additional user, leaving the previous one in the search field.</strong></p>
  
  <p><a href="https://i.stack.imgur.com/8Jhef.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8Jhef.png" alt="enter image description here"></a></p>
  
  <p>As you can see, the first array is the original search result. The second array contains the first employee AND the new employee.</p>
  
  <p>My expected outcome here is that there is a single array with unique objects. This would mean there should be 2 records from my example since the first employee was searched two times, he shouldnt be pushed or included into the array since that object already exists.</p>
  
  <p>Am i using this <code>lodash</code> function incorrectly? <code>QID</code> is a unique valid key in the object as well (not pictured).</p>