Created
December 5, 2021 17:55
-
-
Save OlivierJM/12f4d9826cb537f782defac4707480dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeDuplicates(arr, prop){ | |
return arr.filter((obj, index, self) => { | |
return index === self.findIndex((t) => { | |
return t[prop] === obj[prop] | |
}) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment