I'm having trouble removing duplicate value objects in an array and it's not working as expected. I believe the duplicate function is functioning correctly, but the changes are not being reflected in the li
list. Can you pinpoint where I need to make adjustments?
This is my service file:
addComp(Names,c){
this.item.push({ name: Names, componentid: c});
this.uniqueArray = this.removeDuplicates(this.item, "name"); //this line is problematic
this.item=this.uniqueArray; //this line is causing issues
}