$$contains
Checks whether an array contains a certain value
Usage​
{
"$$contains": [ /* arrays / elements */ ],
"that": /* value */
}
"$$contains(<that>):{input}"
Returns​
boolean
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | array | Yes | Array of arrays / elements (null elements are ignored) | |
that | Any | Value to test for |
Examples​
Input
Definition
Output
[0, [], "a"]
{
"$$contains": "$",
"that": "a"
}
true
[0, [], "a"]
{
"$$contains": "$",
"that": "b"
}
false
[0, [], "a"]
"$$contains(a):$"
true
[0, [], "a"]
"$$contains(b):$"
false