Prism · Logic

$and

Gives its first falsy operand, or the last one when all are truthy, and evaluates no further than that.

The source
{ user: { age: 25, hasPaidPlan: true } }
The config
{
  $and: [
    { $gte: [{ $ref: '$.user.age' }, { $const: 18 }] },
    { $ref: '$.user.hasPaidPlan' },
  ],
}
What comes out
true
Output matches the expected value

Runs in this page on the installed package. The input and the expected output are defined by the example.