Created
September 27, 2017 02:37
-
-
Save martinabrahams/d18f8fc95be09adf5535e08b0d6dc0d4 to your computer and use it in GitHub Desktop.
Get distinct items in array in TypeScript - source https://stackoverflow.com/a/45886147/6732882
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
Array.from(new Set(yourArray.map((item: any) => item.id))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works even for dates-strings 👍