Web features explorer

Array grouping

Newly available since 2024-03-05
Tags: javascript Groups: JavaScript > Collections > Maps

The Object.groupBy() and Map.groupBy() static methods group values of arrays and iterables based on a function that returns a key for each value. To learn more, see Map.groupBy(), Object.groupBy() at MDN.

Compatibility

Specifications