{% assign string = 'wooden, deepsnow, season2006' %}
{% assign array = string | split: ', ' | reverse %}
{{ array | size }}
#=> 3
{% assign string = 'wooden, deepsnow, season2006' %}
{% assign array = string | split: ', '%}
{{ array | first }}
#=> wooden
{% assign string = 'wooden, deepsnow, season2006' %}
{% assign array = string | split: ', '%}
{{ array | last }}
#=> season2006
{% assign string = 'wooden, deepsnow, season2006' %}
{% assign array = string | split: ', '%}
{{array[0]}} #=> wooden
{% assign my_string = 'wooden, deepsnow, season2006' %}
{% assign my_array = my_string | split: ', '%}
{{ my_array | join: ', ' }}
#=> wooden, deepsnow, season2006
{% assign string = 'wooden, deepsnow, season2006' %}
{% assign array = string | split: ', ' | reverse %}
{{ array | first }}
#=> season2006
{{ array | last }}
#=> wooden
<!-- products = "a", "b", "A", "B" -->
{% assign products = collection.products | sort: 'title' %}
{% for product in products %}
{{ product.title }}
{% endfor %}
#=> A B a b
{% assign collection_titles = collections | map: 'title' %}
{% for collection_title in collection_titles %}
{{ collection_title }},
{% endfor %}
#=> каталог1,каталог2,каталог3,
{{ collections.all.products | where: "available", false | size }}
{% assign fruits = "apples, oranges, peaches, tomatoes" | split: ", " %}
{% assign vegetables = "broccoli, carrots, lettuce, tomatoes" | split: ", " %}
{% assign plants = fruits | concat: vegetables %}
=> ["apples","oranges","peaches","tomatoes","tomatoes","broccoli","carrots","lettuce","tomatoes"]
{% assign fruits = "apples, oranges, peaches, tomatoes, tomatoes" | split: ", " | uniq | json %}
=> [apples, oranges, peaches, tomatoes]