split - Liquid Filter Reference - 0.11.6
Filter Name | split |
Group | Arrays |
Version | 0.11.6 |
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 Liquid Reference for 0.11.6
Back to Documentation