Sort a collection by the specified property.
Returns the sorted collection.
Usage | Returns |
---|---|
ImageCollection.sort(property, ascending) | Collection |
Argument | Type | Details |
---|---|---|
this: collection | Collection | The Collection instance. |
property | String | The property to sort by. |
ascending | Boolean, optional | Whether to sort in ascending or descending order. The default is true (ascending). |