sort

Sort elements of an array in standard ascending case-sensitive alphabetical order.

Syntax

{{ array | sort: property }}

Example

{% assign items = "Denver,Austin,Boston" | split: "," %}{{ items | sort | join: ", " }}

Output

Austin, Boston, Denver

The sort filter reorders array elements in ascending case-sensitive alphabetical or numerical order. When sorting collections of objects, an optional property name argument specifies the key to sort by.

In programmatic SEO directories, sort arranges related cities, technician names, or supported integrations in alphabetical order for intuitive visitor browsing. For example: {{ row.nearby_towns | split: ',' | sort | join: ', ' }}. This delivers structured, predictable navigation links that search engine spiders can catalog systematically.

Try this syntax in the editor.