How can I merge together objects that share the same property within an array? [duplicate]

Let’s say we have the following array:

[{time: 1600000000, a: 2}, {time: 1600000000, b: 1}, {time: 1700000000, a: 4}, {time: 1700000000, b: 3}, {time: 1800000000, a: 8}, {time: 1800000000, b: 9}]

How might one be able to efficiently merge together the objects to get the following array

[{time: 1600000000, a: 2, b: 1}, {time: 1700000000, a: 4, b: 3}, {time: 1700000000, a: 8, b: 9}]