Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find duplicate values in array object javascript

duplicateIds = arr
     .map(e => e['id'])
     .map((e, i, final) => final.indexOf(e) !== i && i)
     .filter(obj=> arr[obj])
     .map(e => arr[e]["id"])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #duplicate #values #array #object #javascript
ADD COMMENT
Topic
Name
3+9 =