Skip to main content

split

Divides a string into an array of substrings. The division is done by searching for a pattern, which is provided as the first argument to the filter.

Basic Usage

{% set my_array = "a-b-c" | split("-") %}
{{ my_array | join(", ")}}

Output: a, b, c