How to combine array of objects with common id in each object with ES6 functions [closed]

Attaching the input and output formats.
`

//Input
[{"id":"146","catId":"25"},
{"id":"200","catId":"25"},
{"id":"250","catId":"55"}];
//Output expected
[{"catId":"25","topicIds":["146","200"]},
{"catId":"55","topicIds":["250"]}];

`