- :block
- or :nothing
sort
sort given block in ascending order
Parameters
sort collection :literal :pathliteral :dictionary :block
Attributes
as | :literal | localized by ISO 639-1 language code |
sensitive | case-sensitive sorting | |
descending | sort in descending order | |
values | sort dictionary by values | |
by | :string, :literal | sort array of dictionaries by given key |
Returns
Examples
copya: [3 1 6] print sort a ; 1 3 6
copyprint sort.descending a ; 6 3 1
copyb: ["one" "two" "three"] sort 'b print b ; one three two