Groups the elements of an array into a map, with the key being based on a key mapper, and the value being the values for the same key mapper result.
6.1.0
groupMapReducingBy
Grouped map.
groupMapBy([1, 2, 3, 4, 5], val => val % 2)// => Map{0: [2, 4], 1: [1, 3, 5]}
Array to group.
Function returning the key for the value.
Generated using TypeDoc
Groups the elements of an array into a map, with the key being based on a key mapper, and the value being the values for the same key mapper result.
Since
6.1.0
See
groupMapReducingBy
Returns
Grouped map.
Example