Sorts an Array of Objects based on key values, like an SQL `ORDER BY`