The source iterable.
A function to extract the key for each element.
Sorts the elements of a sequence in ascending order.
const items = [{ id: 1 }, { id: 3 }, { id: 2 }];
const ordered = orderBy(items, x => x.id).toArray(); // Will be [{ id: 1 }, { id: 2 }, { id: 3 }]
TSource The type of the source iterable.
TKey The type of the key returned by keySelector.
An IOrderedEnumerable
The source iterable.
A function to extract the key for each element.
An Comparer
Generated using TypeDoc
Sorts the elements of a sequence in ascending order.
Example
Typeparam
TSource The type of the source iterable.
Typeparam
TKey The type of the key returned by keySelector.
Returns
An IOrderedEnumerable whose elements are sorted according to a key.