- groupBy<T, TKey>(
input: Iterable<T>,
keySelector: (arg: T) => TKey,
): Iterable<[TKey, T[]]> Parameters
- input: Iterable<T>
- keySelector: (arg: T) => TKey
Returns Iterable<[TKey, T[]]>
- groupBy<T, TKey, TValue>(
input: Iterable<T>,
keySelector: (arg: T) => TKey,
elementSelector: (arg: T) => TValue,
): Iterable<[TKey, TValue[]]> Parameters
- input: Iterable<T>
- keySelector: (arg: T) => TKey
- elementSelector: (arg: T) => TValue
Returns Iterable<[TKey, TValue[]]>
Groups the input into an iterable with the key and values.
See from(sequence).groupBy for examples.