first - Liquid Filter Reference - 1.0.0
Filter Name | first |
Group | Arrays |
Version | 1.0.0 |
Description
Returns the first item of an array.
Examples
{{ "Mary had a little lamb." | split: " " | first }}
Mary
{% assign an_array = "earth, water, air, fire" | split: ", " %}
{{ an_array | first }}
earth
Back to Liquid Reference for 1.0.0
Back to Documentation