first
First returns the first character of a string or the first element of a slice.
First returns the first character of a string or the first element of a slice.
Input
string array
Parameters
None
Returns
string, any
Examples
Pick the first item from a list
Input
items = ["espresso", "latte", "macchiato"]Template
{{ items | first }}Output
espressoTake the first letter of a name
Input
name = "Alice"Template
{{ name | first }}Output
AHow is this guide?