I have an array like this:
I would like to group and get the sum of each repetition like this:
How about a simple map() function? Like this:
var t = YourArray; var u = t.map(function (a, i) { var g = {}; g[a.AGENDADOR] = a.TOTAL; return g; });