mirror of
https://github.com/kemko/liquid.git
synced 2026-01-02 16:25:42 +03:00
664 B
664 B
title
| title |
|---|
| first |
Returns the first item of an array.
Input
```liquid {% raw %} {% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}{{ my_array.first }} {% endraw %}
<p class="code-label">Output</p>
```text
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
{{ my_array.first }}
Input
```liquid {% raw %} {% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}{{ my_array.first }} {% endraw %}
<p class="code-label">Output</p>
```text
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}