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.

Specifications

Browser support

  • Chrome 117 Released on 2023-09-12
  • Chrome Android 117 Released on 2023-09-12
  • Edge 117 Released on 2023-09-15
  • Firefox 119 Released on 2023-10-24
  • Firefox for Android 119 Released on 2023-10-24
  • Safari 17.4 Released on 2024-03-05
  • Safari on iOS 17.4 Released on 2024-03-05

Usage (according to Chrome Platform Status)

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