I have the following issue. I have an array of objects and I would like to add the values where the date is equal.
This is the starting array:
0: {date: "07-04-2020", value: 10}
1: {date: "10-04-2020", value: 20}
2: {date: "07-04-2020", value: 30}
3: {date: "14-04-2020", value: 60}
It should result in the following:
0: {date: "07-04-2020", value: 40}
1: {date: "10-04-2020", value: 20}
3: {date: "14-04-2020", value: 60}
I tried some higher order functions, such as filter, map and reduce but I am clueless.