DEV Community

Discussion on: Removing duplicates in an Array of Objects in JS with Sets

Collapse
 
marinamosti profile image
Marina Mosti

Well, you're passing [address.id] as an index to the dupAddress array, that's just not going to work because the id !== index. Try changing it to address.id or address.name without accessing the array

Collapse
 
itachiuchiha profile image
Itachi Uchiha • Edited

Okay, I tried it didn't work actually I was wonder why that didn't work. Thanks.