Array Filters
Array filters are used to change the output of arrays.
compact
Syntax
array | compact
array | compact
Gets rid of any nil items from an array.
concat
Syntax
array | concat: array
array | concat: array
Concatenates (combines) two arrays.
The concat filter does not remove duplicates. To eliminate duplicates, use the uniq filter instead.
first
Syntax
array | first
array | first
Returns the first item in an array.
Dot notation
You can apply the first
filter using dot notation when including it in a tag or object output.
join
Syntax
array | join
array | join