> For the complete documentation index, see [llms.txt](https://docs.pixiebrix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pixiebrix.com/developing-mods/developer-concepts/text-template-guide/transforming-data-with-filters.md).

# 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:

```
I have one {{ @pet.type }} named {{ @pet.name | upper }}
```

Will produce the following:

```html
I have one cat named TIGER
```

{% hint style="info" %}
A complete [list of supported filters is available here](https://mozilla.github.io/nunjucks/templating.html#builtin-filters).&#x20;
{% endhint %}

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 Case
* `truncate`: 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(",")`

{% hint style="info" %}
Under the hood, PixieBrix uses the popular [Nunjucks templating language](https://mozilla.github.io/nunjucks/), developed by the non-profit that makes the Firefox web browser!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pixiebrix.com/developing-mods/developer-concepts/text-template-guide/transforming-data-with-filters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
