Just released: Developer preview of Microsoft Teams bot integration for Now Assistant. Try with your Teams ×

Filters

Filters are used to modify the output of numbers, strings, variables and objects. They are placed within an output tag {{ }} and are denoted by a pipe character |.

Input

<!-- item.title = "Toaster Inc has a new factory" -->
{{ product.title | upcase }}

Output

TOASTER INC HAS A NEW FACTORY

In the example above, item is the object, title is its attribute, and upcase is the filter being applied.

Some filters require a parameter to be passed.

Input

{{ "/my/fancy/url" | append: ".html" }}

Output

/my/fancy/url.html

Multiple filters can be used on one output. They are applied from left to right.

Input

{{ "adam!" | capitalize | prepend: "Hello " }}

Output

Hello Adam!