$and

$and operator lets you evaluate an AND condition between 2 or more conditions to be compared with each other. These sub-conditions can be both Simple Conditions or Compound Conditions. You can use this in any Conditional Objects.

$and will return true only if all sub-conditions return true.

Syntax

{
    "$and": [ <cond>, <cond>, ...]
}

Properties

FieldDescriptionRequired

<cond>

A nested Simple Condition object or Compound Condition object. This can also be a Magical Autocomplete.

true

Examples

Let's say we have declared a variable age in our API flow, which has a value of 20 currently and a variable marks with value 80.

{
    "$and": [
        {
            "$.variables.age": {
                "$gte": 10
            }
        },
        {
            "$.variables.marks": {
                "$gt": 90
            }
        }
    ]
}

The above expression would resolve to false.

Last updated