v1.9.1
Sorts items in an array in case-sensitive order.
Input
{% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %} |
Output
|
An optional argument specifies which property of the array’s items to use for sorting.
{% assign products_by_price = collection.products | sort: "price" %} |