I have a result of "ImputacionData", and with a reduces it I group it with an attribute of the object:
this.imputacionesDatas = data;
this.imputacionesAndAusencias = this.imputacionesDatas.reduce(function (r, a) {
r[a.empleadoId] = r[a.empleadoId] || [];
r[a.empleadoId].push(a);
return r;
}, Object.create(null));
The problem that I do not know how to work with the result, would need to put it in a Map to be able to work with that data on the screen and be able to paint them.
I do not know how to put the result of the "reduce" in something like:
Map <number, Array <ImputacionData >>;