David91
3 years agoFrequent Contributor
Return [object Object]
Hi, i have a problem with this script. count return value [object Object]... why? Where i do mistake? This script should return ..
I need..
{ "a": 3, "b": 2, "c": 2, "d": 2, "e": 2, "f": 1, "g": 1, "h": 3 }
my Method
function getDuplicates() {
uniqueCount = ["a","b","c","d","d","e","a","b","c","f","g","h","h","h","e","a"];
var count = {};
uniqueCount.forEach(function(i) { count[i] = (count[i]||0) + 1;});
Log.Message(count)
}
Thank you