re: Removing duplicates in an Array of Objects in JS with Sets VIEW POST

FULL DISCUSSION
 

Hi ! One other one line path to Rome, from France :


arr = arr.filter((power, toThe, yellowVests) => yellowVests.map(updateDemocracy => updateDemocracy['id']).indexOf(power['id']) === toThe)

console.log(arr)


`

 
 
code of conduct - report abuse