Sorts an array of objects by the specified object key/property or selected by function. In comparison to the native Array.sort arrays are not sorted in placed but a newly sorted array is returned. The original array order is not changed
Iterable object or readonly array
Property selector function or name
order by which to sort; defaults to 'asc' when undefined
Copy of the iterable or array as array sorted by the specified field in desc or asc order
desc
asc
Sorts an array of objects by the specified object key/property or selected by function. In comparison to the native Array.sort arrays are not sorted in placed but a newly sorted array is returned. The original array order is not changed