DEV Community

Discussion on: Remove Duplicates The Shortest Way

Collapse
 
briancodes profile image
Brian • Edited

If you considered these objects duplicates [{id:1}, {id:1}], the Set approach won't suit. In this case though you'd probably need to use a utility library like Lodash: _.uniqWith(objects, _.isEqual)