first Filter

Data Structure

Argument: outputs the first element in a sequence. (Optional)

Documentation

Outputs the first element in a sequence.

Variable

veggies = ['Tomatoes', 'Cucumbers', 'Peas']

Template

{{ veggies|first }}

Result

Tomatoes

Did we get something wrong? Is there a use case for the first filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on Sept. 16, 2020, 7:34 p.m. EST