any()
Definition and usage
Tests whether at least one candidate matches a scalar value or occurs in a collection.
Syntax
any(valueOrList, ...values)
Parameter values
| Parameter | Allowed type | Required | Description |
|---|---|---|---|
valueOrList |
mixed | Yes | Scalar value or collection to search. |
values |
mixed | Yes | One or more candidate values. |
Return value
| Return type | boolean |
|---|---|
| Output | true when any candidate is present. |
Examples
Example 1
any(this.service, "HTTP", "TELNET")
Expected return value:
true when either service is presentExample 2
any(appliance.interfaces.$name.network_type, "internet", "external")
Expected return value:
true for a matching interface, uniform zone, or mixed zoneExample 3
any(split("a,b", ","), "x", "y")
Expected return value:
false