Skip to content
Advertisement

Grouping and summing array objects

I’m having a data sample like this

JavaScript

What I want to achieve with this data is to group it and sum it up so it comes out like this

JavaScript

What the current code I have, I do not get the output as I want.

JavaScript

Advertisement

Answer

Try this

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement