Modifier: merge


Merge an array variable with another array variable.

YAML
fruit:
  - apples
  - bananas
  - bacon
meat:
  - pork
  - beef
  - chicken
Template
{{ fruit }}
Output
apples bannanas bacon
Template
{{ meat }}
Output
pork beef chicken
Template
{{ fruit merge="meat" }}
  {{ value }}
{{ /fruit }}
Template
apples bananas bacon pork beef chicken 

Additional Reading

Learn how to use and chain modifiers in the Antlers template guide.

Last modified on July 15, 2019