Array filters

Array filters change the output of arrays.

join

Joins the elements of an array with the character passed as the parameter. The result is a single string.

first

Returns the first element of an array.

You can use first with dot notation when you need to use the filter inside a tag.

last

Returns the last element of an array.

You can use last with dot notation when you need to use the filter inside a tag.

Using last on a string returns the last character in the string.

concat

Concatenates (combines) an array with another array. The resulting array contains all the elements of the original arrays. concat will not remove duplicate entries from the concatenated array unless you also use the uniq filter.

You can string together multiple concat filters to combine more than two arrays:

index

Returns the item at the specified index location in an array. Note that array numbering starts from zero, so the first item in an array is referenced with [0]