Skip to content
Advertisement

how to modify an array of objects with certain groups in to and array of object with group and related items?

I have the following array of object that I want to chance its structure , I am trying to use reduce to get a new object with element that have the same group..

JavaScript

Advertisement

Answer

Here is an example:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement