Modifier: flatten

Flattens a multi-dimensional array (a Grid or Replicator field for example) into a single dimension.

  spices: [garlic, cumin, ginger, turmeric, paprika, curry powder]
  vegetables: [tomatoes, onion]
  meat: [chicken]
{{ ingredients | flatten }}
  - garlic
  - cumin
  - ginger
  - turmeric
  - paprika
  - curry powder
  - tomatoes
  - onion
  - chicken

Additional Reading

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

Last modified on March 31, 2016