I've really been wrecking my brain over this one so any assistance is greatly appreciated. I currently have an array of objects and each of these objects has two properties, a timestamp (ms since epoch) and an arbitrary for that timestamp. Like so:
[
[1518739200000, 1],
[1518739200000, 1],
[1518739200000, 12],
[1518739200000, 16],
[1518739200000, 16],
[1518825600000, 16],
[1518825600000, 20],
[1518825600000, 20],
[1518825600000, 8],
]
What I'm trying to do is to condense the multidimensional array into another multidimensional array which has only the unique values of the first index, the timestamp, and an aggregate count as the second value. In example, I'm looking for this from the given set of data included above.
[
[1518739200000, 46],
[1518825600000, 64],
]
I've tried using .reduce in a few ways but haven't had any success yet for this particular kind manipulation.
32as far as I can see...