Preparing search index...
The search index is not available lightdash
Function groupMapReducingBy
group Map Reducing By< TValue , UKey , VReduced > ( array: readonly TValue [] , keyMapper: ArrayIterator < TValue , UKey > , initializer: ArrayIterator < TValue , VReduced > , reducer: ( ( current: VReduced , value: TValue , index: number , collection: readonly TValue [] ) => VReduced ) ) : Map < UKey , VReduced >
Parameters
array: readonly TValue []
initializer: ArrayIterator < TValue , VReduced >
reducer: ( ( current: VReduced , value: TValue , index: number , collection: readonly TValue [] ) => VReduced )
( current: VReduced , value: TValue , index: number , collection: readonly TValue [] ) : VReduced
Parameters
current: VReduced
value: TValue
index: number
collection: readonly TValue []
Returns VReduced
Returns Map < UKey , VReduced >
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 being reduced.
Since
11.0.0
See
Returns
Grouped and reduced map.
Example