join
array | join
returns string
Combines all of the items in an array into a single string, separated by a space.
{{ collection.all_tags | join }}
{{ collection.all_tags | join }}
{
"collection": {
"all_tags": [
"extra-potent",
"fresh",
"healing",
"ingredients"
]
}
}
Output
extra-potent fresh healing ingredients
Anchor to Custom separator
Custom separator
array | join: string
You can specify a custom separator for the joined items.
{{ collection.all_tags | join: ', ' }}
{{ collection.all_tags | join: ', ' }}
{
"collection": {
"all_tags": [
"extra-potent",
"fresh",
"healing",
"ingredients"
]
}
}
Output
extra-potent, fresh, healing, ingredients
Was this page helpful?