We’ve added new Sort Types for sorting Arrays.
Here’s a quick tutorial on what they are and how to use them.
Here’s a simple array:
Using the Sort filter type “text”, the array will be sorted Case-sensitive.
A boolean true, in the asc field, sorts the array alphabetically A-z (false boolean sorts z-A)
Using the sort filter type, “itext”, the array will be sorted case-insensitive.
With, a true boolean for asc, in alphabetical order.
The “number” sort type, is used to sort numbers. A true boolean for asc sorts it lowest to highest. And a false boolean sorts it highest to lowest.
The sort type “natural” would be used to sort things with numbers how you would expect them. (“inatural” is case-insensitive).
For example, the below array when sorted by the number or text type results in the following order:
However, when the natural sort type is used, the order of the array is how we might naturally expect this array to be sorted: