Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove duplicate object from array javascript

const uniqify = (array, key) => array.reduce((prev, curr) => prev.find(a => a[key] === curr[key]) ? prev : prev.push(curr) && prev, []);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #duplicate #object #array #javascript
ADD COMMENT
Topic
Name
1+3 =