I'm facing an issue that involves working with an array of objects and adding their values where the dates are equal.
Here is the initial 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}
The expected result should be:
0: {date: "07-04-2020", value: 40}
1: {date: "10-04-2020", value: 20}
3: {date: "14-04-2020", value: 60}
Despite trying various higher order functions like filter, map, and reduce, I am still unable to solve this problem.