join
Filter
Combine array elements into a list with delimiter.
Parameters
Parameter | Required | Description |
---|---|---|
delimiter
|
No |
string List delimiter to use when joining elements together. Leave out or pass
in an empty string to join together without a delimiter.
|
Category
Description
Joins the elements of an array together with a separator or delimiter.
{% comment %} Our sample array to work with is a list of navigation link titles. {% endcomment %} {% assign links = navigation.links | map: 'title' %} {{ links | join }} {{ links | join: ', ' }}
Example Output
HomeProductsAbout UsContact Us Home, Products, About Us, Contact Us