GMSortBy is a companion library for getting the most out of array_sort in an easy-to-read, semantic way. Sort arrays of arrays, structs, and instances by intuitive helpers with support for sorting by multiple criteria, not by opaque-looking custom inline methods.
Sorting a 2D array by column 0 in ascending order:
Sorting a 2D array by column 0 in ascending order, then column 2 in descending order:
array_sort(array, sortby_indices([0, 2], [true, false]));
Sorting an array of structs by the key "score" in descending order:
array_sort(array, sortby_key("score", false));
See the Wiki section on the official GitHub repository.