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