first

Description

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

Syntax

{{ <string_or_array_or_collection> | first }}

Examples

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

return

42
H
© 2024 LocomotiveCMS Terms of use Privacy Policy
Back to top