any#
The any()
function returns true when the comparison operator in the argument returns true for any values in the argument array.
Syntax#
any(array_expression)
Parameters#
array_expression
: An expression that evaluates to an array of values to be checked.
Return Value#
Returns a boolean value: true
if the comparison is true for any element in the array, false
otherwise.
Example#
any(http.request.headers["block-me"][*] == "true")
Use Cases#
- Checking if any value in an array of headers matches a specific condition
- Validating if any element in a list meets certain criteria
- Implementing flexible filtering based on multiple possible matches