Array groupingBaseline · Widely available
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.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 5, 2024. Widely available since Sep 5, 2026.
Browser support
DesktopChrome
1–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155Edge
12–116Not supported
117+Supportedsince Sep 15, 2023
Current: 154Firefox
1–118Not supported
119+Supportedsince Oct 24, 2023
Current: 157Safari
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27MobileChrome Android
18–116Not supported
117+Supportedsince Sep 12, 2023
Current: 155Firefox Android
4–118Not supported
119+Supportedsince Oct 24, 2023
Current: 157Safari iOS
1–17.3Not supported
17.4+Supportedsince Mar 5, 2024
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: groupBy.
Feature detection
JS · check before using
if ("groupBy" in Map || ("prototype" in Map && "groupBy" in Map.prototype)) {
// Map.groupBy is available
}Specification
Sub-features
Support for each part of the feature (2). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Map.groupBy | 117 | 117 | 119 | 17.4 | 117 | 119 | 17.4 |
| Object.groupBy | 117 | 117 | 119 | 17.4 | 117 | 119 | 17.4 |