So I have an existing array with three objects:
[ { date: 3/12/2022, oService: 10}
{ date: 3/13/2022, oService: 12, aService: 1}
{ date: 3/13/2022, oService: 1 }]
Based on the date, I would like to get something that looks like the following:
[ {date: 3/12/2022, oService: 10}
{date: 3/13/2022, oService: 13, aService: 1}]
additionally, I could have up to 10 services, so I cant reduce by prev.oService. I'll have an array of services that looks something like:
const Services = [aService, bService, cService, oService, yService]