Awee

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

#TypeRequired
0stringno

Returns

array

Examples

{{ names | sort }}
{{ scores | sort:'desc' }}
{{ items | sort:'asc' }}

How is this guide?

On this page