first
返回数组的第一项。
输入
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
{{ my_array.first }}
输出
apples
输入
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}
输出
zebra
返回数组的第一项。
输入
{% assign my_array = "apples, oranges, peaches, plums" | split: ", " %}
{{ my_array.first }}
输出
apples
输入
{% assign my_array = "zebra, octopus, giraffe, tiger" | split: ", " %}
{{ my_array.first }}
输出
zebra