Grouping an array of objects by key
With the help of array.reduce, the Map data structure and some higher-order functions you can do a lot in JavaScript, for example, building a generic groupBy function for an array of objects.
Posted 25. July 2019 by Alexander von Studnitz
– 6 min read