Skip to content
Please update to the latest release 0.77.3 to address Multiple CVEs.

filter

Function
Arg Description Type
list A list of items to filter list of Any (required)
regex A regex to test each item string
condition A VQL lambda to use to filter elements Lambda

Description

Filters an array by regex or condition.

Note that if a condition is specified as well as a regex then only the condition is applied.

Examples

filter(list=["AA", "AB", "BA", "BB"], regex="^A") -> ["AA", "AB"]
filter(list=[1, 2, 3, 4, 5, 6], condition="x=>x > 3") -> [4, 5, 6]