title: How to remove duplicate object from an array in angular 6
body: <p>I am trying to remove duplicate value objects in an array but not working... I think duplicate function is working but not reflecting in <code>li</code> list. Can you find out where I have to change?</p>
  
  <p>My service file:</p>
  
  <pre><code> addComp(Names,c){   
   this.item.push({ name: Names, componentid: c});
   this.uniqueArray = this.removeDuplicates(this.item, "name"); //this line issue
   this.item=this.uniqueArray; //this line issue
   }
  </code></pre>