group array of object with common ids and concatenate their other properties using javascript
I am trying to achieve a pretty complex iteration but havent been successful so far using reduce. Here is a small example of it The input is as follows let input = { "data": [ { "state": "CA", "city": […