JavaScript Tested
Sort an array by multiple keys
Sort objects by one field, then break ties with another, with ascending or descending order per field.
Loading snippets…
1 snippet
Sort objects by one field, then break ties with another, with ascending or descending order per field.