Filters Reference

Complete reference for data transformation filters in Spala expressions.

Filters Reference

Filters transform values within Spala expressions. They are applied using the pipe (|) operator and can be chained together to perform multiple transformations in sequence.

Syntax

expression | filterName
expression | filterName(arg1, arg2)
expression | filter1 | filter2 | filter3

Filters read the value on the left side of the pipe, transform it, and pass the result to the next filter or use it as the final value.

Examples

vars.name | uppercase
// "john doe" → "JOHN DOE"
vars.items | map('name') | join(', ')
// [{name: "Apple"}, {name: "Banana"}] → "Apple, Banana"
vars.price | round(2)
// 19.956 → 19.96
vars.createdAt | format('YYYY-MM-DD')
// Date → "2026-03-06"

Chaining

Filters are evaluated left to right. Each filter receives the output of the previous one:

vars.description | trim | lowercase | truncate(100)

This trims whitespace, converts to lowercase, then truncates to 100 characters.

Filter arguments can be literals, variable references, or nested expressions. For example: vars.items | slice(0, vars.pageSize).

Categories

String Filters
/reference/filters/string

Transform text: uppercase, lowercase, trim, replace, split, slugify, and more.

Array Filters
/reference/filters/array

Manipulate arrays: map, filter, sort, unique, flatten, groupBy, and more.

Number Filters
/reference/filters/number

Work with numbers: round, floor, ceil, clamp, abs, toFixed, and more.

Date Filters
/reference/filters/date

Format and manipulate dates: format, addDays, diffInDays, isAfter, and more.

Object Filters
/reference/filters/object

Transform objects: keys, values, pick, omit, merge, has, and more.

Type Filters
/reference/filters/type

Convert and check types: toString, toNumber, toBoolean, isEmpty, typeOf, and more.

Steps Reference
/reference/steps
Step types that use filters in expressions
Operators
/reference/operators
Operators for use alongside filters in expressions
Data Types
/reference/data-types
Supported data types that filters transform