Liquid Filter Reference for split - v0.9.5

Filter Name split
Group Arrays
Version 0.9.5

Description

Divides a string into an array using the argument as a separator. split is commonly used to convert comma-separated items from a string to an array.

Examples

{% assign an_array = "earth, water, air, fire" | split: ", " %}

{% for element in an_array -%}
- {{ element }}
{% endfor %}
- earth
- water
- air
- fire

Back to Filter List

Back to Liquid Reference for 0.9.5

 

 
Back to Documentation