Skip to content

and

and(values...) → boolean · Type

Logical AND — returns true only if all arguments are truthy.

  • values (variadic): boolean values to combine
bash
echo '{"active": true, "verified": true, "paid": false}' \
  | utlx -e 'and($input.active, $input.verified, $input.paid)'
# false (all must be true, but paid is false)
utlx
// Input: {"active": true, "verified": true, "paid": true}
{
  canShip: and($input.active, $input.verified, $input.paid),  // true
  canRefund: and($input.paid, $input.delivered)               // false if delivered is null
}

Released under AGPL-3.0.