Go to page content

first

Returns the first character or element.

Returns the first byte of a binary or the first element of a list.  An empty binary is returned when the input is empty.

For example:

{{ value|first }}

When the value is “hello” then the output is “h”.

See also the tail filter.

This page is part of the Zotonic documentation, which is licensed under the Apache License 2.0.