v8.4.0
Sorts items in an array in case-insensitive order.
Input
1 | {% assign my_array = "zebra, octopus, giraffe, Sally Snake" | split: ", " %} |
Output
1 |
|
An optional argument specifies which property of the array’s items to use for sorting.
1 | {% assign products_by_company = collection.products | sort_natural: "company" %} |