Last active
December 12, 2020 00:28
-
-
Save volkovasystems/0c9913c9c8dccba9da423c7cf30a168f to your computer and use it in GitHub Desktop.
get all unique element object in array by property and return as is
This file contains hidden or 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 Map( | |
( | |
array | |
.map( | |
function( element ){ | |
return ( | |
[ | |
element[ property ], | |
element | |
] | |
); | |
} | |
) | |
) | |
) | |
) | |
.values( ) | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment