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 |
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.
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]