Web platform 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

Usage (according to Chrome Platform Status)

~1.831% of page loads. More data at chromestatus.

Specifications