Skip to main content

concat

array | concat: array

Concatenates (combines) two arrays.


Note

The concat filter won't filter out duplicates. If you want to remove duplicates, then you need to use the uniq filter.


{%- assign types_and_vendors = collection.all_types | concat: collection.all_vendors -%}

Types and vendors:

{% for item in types_and_vendors -%}
{%- if item != blank -%}
- {{ item }}
{%- endif -%}
{%- endfor %}

Output

Types and vendors:

- Animals & Pet Supplies
- Baking Flavors & Extracts
- Container
- Cooking & Baking Ingredients
- Dried Flowers
- Fruits & Vegetables
- Gift Cards
- Health
- Health & Beauty
- Invisibility
- Love
- Music & Sound Recordings
- Seasonings & Spices
- Water
- Clover's Apothecary
- Polina's Potent Potions
- Ted's Apothecary Supply
Was this page helpful?