DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Get all unique values in a JavaScript array of objects (remove duplicates)
const uniqueArray = propertyList.filter( (v, i, a) => a.findIndex((t) => t.type === v.type) === i );
Source by www.javascripttutorial.net #
PREVIOUS
NEXT
Tagged:
#Get
#unique
#values
#JavaScript
#array
#objects
ADD COMMENT
Topic
COMMENT
Name
3+8 =
Submit