filter

Function

ArgDescriptionType
listA list of items to filterlist of Any (required)
regexA regex to test each itemstring
conditionA VQL lambda to use to filter elementsLambda

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]