Lodash has a helpful iteration methods, such as forEach and map that work on objects as … I felt compelled to write that you probably should combine forEach and map with the answer of Alexey Lebedev. Using a property of the array passed in the _.groupBy () function: First, declare the array (here array is ‘arr’). my code