--- title: "Liquid filters: concat" description: Concatenates (combines) two arrays. api_name: liquid source_url: html: https://shopify.dev/docs/api/liquid/filters/concat md: https://shopify.dev/docs/api/liquid/filters/concat.md --- # concat ```oobleck 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](https://shopify.dev/docs/api/liquid/filters/uniq). *** ```liquid {%- 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 %} ``` ##### Code ``` {%- 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 %} ``` ##### Data ``` { "collection": { "all_types": [ "", "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" ], "all_vendors": [ "Clover's Apothecary", "Polina's Potent Potions", "Ted's Apothecary Supply" ] } } ``` ## Output ```html 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 ```