DEV Community

Mussa Tawerghi
Mussa Tawerghi

Posted on

Answer: How to loop through an array of objects and find objects with same value [duplicate]

By far the easiest approach is using a simple for/of loop.

Create an output object, and then iterate over the array. On each iteration of the array of objects: if output doesn't already have a property key that matches the name of the current object create one by assigning…

Top comments (0)