function removeDuplicates(arr) {
let _arr = []
return arr.filter((item, index) => {
_arr.push(JSON.stringify(item))
return _arr.indexOf(JSON.stringify(item)) == index
});
}
Last active
July 4, 2023 10:57
-
-
Save vwedesam/c899de8315b945511917ef45e58d80b8 to your computer and use it in GitHub Desktop.
remove duplicates in an array(JS)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment