Echo JS 0.11.0

<~>

joeted comments

joeted 1643 days ago. link 1 point
In term of design, what you want is to perform a group by operation and probably then map it to the final datastructure (bike, modelId, color, quantity)

There are several ways to implement the two steps, including using a lib (lodash groupBy for example) or the reduce mentioned in the other comment.