sort
Sort sorts a slice in ascending or descending order.
Sort sorts a slice in ascending or descending order. Handles strings, numbers, and booleans. Elements of mixed types are grouped by type name.
Input
array
Parameters
| # | Type | Required |
|---|---|---|
| 0 | string | no |
Returns
array
Examples
{{ names | sort }}
{{ scores | sort:'desc' }}
{{ items | sort:'asc' }}How is this guide?