Prism · Logic
$and
Gives its first falsy operand, or the last one when all are truthy, and evaluates no further than that.
{ user: { age: 25, hasPaidPlan: true } }{
$and: [
{ $gte: [{ $ref: '$.user.age' }, { $const: 18 }] },
{ $ref: '$.user.hasPaidPlan' },
],
}true
Runs in this page on the installed package. The input and the expected output are defined by the example.