last

Description

Return the last occurrence of the input object. If the object is a String, it returns the last letter. If it is an Array, the last entry is returned. If the input is a collection, the last method is called on that collection.

Syntax

{{ <string_or_array_or_collection> | last }}

Examples

{{ [42, 0] | last }}
{{ 'Hello World' | last }}

outputs

0
d
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top