Signature
path=null start=null
Type Parameters
- T extends
{ [key: string]: string | number }- The type of the objects in the array.
Parameters
- arr:
T[]- The array to sort. - prop:
string- The property to sort by.
Returns
T[] - The sorted array.
Sorts an array of objects based on a specified property.
{ [key: string]: string | number } - The type of the objects in the array.T[] - The array to sort.string - The property to sort by.T[] - The sorted array.