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.

Learning resources on MDN

Browser support

Specifications