The Filter component is a component that filters the data that passes the contents of the input payload to the next component and outputs it to the output payload.
You can enter a conditional expression that allows you to pass a test if it’s true, or not.
The conditional expression is written with variables with tp.
/ tv.
/ ap.
/ av.
/ cp.
/ cv.
prefixes as comparison targets.
Condition Example | Formula |
---|---|
Payloads are targeted and Payloads are numerical in nature | cv.Payload > 10 |
String | cv.Payload =~ "^abc" |
JSON Array | cv.Payload[1] > 10 |
JSON Object | cv.Payload.key1 == "abc" |
The expression field supports basic operators such as ^
to indicate the start of a string.
Component Properties
Name | Description |
---|---|
Condition | Write a conditional expression |
Available Modifiers
Modifiers | + - / * & | ^ ** % >> << |
---|---|
Comparators | > >= < <= == != =~ !~ |
Logical Ops | || && |
Examples
- If you like the action to stop unless the JSON value
book_id
of the first book in thebooks
array intv.Data
payload is set to12345
, you can use a Comparator, for exampletv.Data.books[0].book_id == 12345
Need more help with this?
Join our slack community for help