Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function removeDuplicateObjects(arrayOfObjects) {
- let newObj = new Set();
- arrayOfObjects.forEach(item => newObj.add(JSON.stringify(item)))
- return Array.from(newObj).map(item => JSON.parse(item))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement