Outputs the first element in a sequence.
Variable
veggies = ['Tomatoes', 'Cucumbers', 'Peas']
Template
{{ veggies|first }}
Result
Tomatoes
Argument: outputs the first element in a sequence.
(Optional)
Outputs the first element in a sequence.
veggies = ['Tomatoes', 'Cucumbers', 'Peas']
{{ veggies|first }}
Tomatoes
Did we get something wrong? Is there a use case for the
first
filter that we should add?
Please let us know.