Transforming Data with Filters
You can transform an expression by providing one or more filters in the template expression. Filters are provided using the |
pipe operator.
For example, to upper case the pet’s name:
Will produce the following:
A complete list of supported filters is available here.
Some filters accept arguments. To pass arguments to a filter, include the arguments list in parentheses: filter(arg1, arg2, ...)
Popular transformation filters are:
title
: convert text to Title Casetruncate
: truncate the text with ellipses. For example:@description | truncate(10)
to truncate text to 10 characters.join
: concatenate values using a separator. For example:@names | join(",")
Under the hood, PixieBrix uses the popular Nunjucks templating language, developed by the non-profit that makes the Firefox web browser!
Last updated