underscore groupby to group an array objects

PHOTO EMBED

Tue Jul 07 2020 08:26:20 GMT+0000 (UTC)

Saved by @nikhil3790 #javascript

var groupedCars = _.groupBy(cars, function(car) { return car.make; });
content_copyCOPY

https://stackoverflow.com/questions/11582284/using-underscore-groupby-to-group-an-array-of-cars-by-their-colour