Currently, I got an array like that:
var uniqueCount = Array();
After a few steps, my array looks like that:
uniqueCount =
You can have an object that contains counts. Walk over the list and increment the count for each element:
var counts = {}; uniqueCount.forEach(function(element) { counts[element] = (counts[element] || 0) + 1; }); for (var element in counts) { console.log(element + ' = ' + counts[element]); }