SortBy

WMA link


SortBy[list, f]

sorts list (or the elements of any other expression) according to canonical ordering of the keys that are extracted from the list's elements using f. Chunks of elements that appear the same under f are sorted according to their natural order (without applying f).

SortBy[f]

creates an operator function that, when applied, sorts by f.

Null