Skip to content

Concat

Concatenates (combines) two arrays.

Example

Data
json
{
  "pets": [
    "Cat",
    "Dog",
  ],
  "wild": [
    "Lion",
    "Tiger",
  ],
}
liquid
{%- assign animals = pets | concat: wild -%}

Pets and wild Animals:

{% for name in animals -%}
    - {{ name }}
{%- endfor %}

Output

Sellers and buyers:

  • Cat
  • Dog
  • Lion
  • Tiger