last

Extract and return the final element located at the end of an array.

Syntax

{{ array | last }}

Example

{% assign path_parts = "USA,Texas,Austin" | split: "," %}{{ path_parts | last }}

Output

Austin

The last filter extracts the final element of an array, providing direct access to the tail end of any collection regardless of its total length.

On programmatic SEO pages, last extracts the most granular geographic level from hierarchical breadcrumb trails or category taxonomies. For example: {{ row.hierarchy_path | split: '/' | last }} Office. This highlights the immediate local neighborhood name in call-to-action buttons, creating highly relevant localized conversion cues.

Try this syntax in the editor.