Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find how many similar object item in an array in javascript

const counts = {};
your_array.forEach(function(x.name) { counts[x.name] = (counts[x.name] || 0)+1; });
 
PREVIOUS NEXT
Tagged: #find #similar #object #item #array #javascript
ADD COMMENT
Topic
Name
7+1 =