And Op

This op represents one AND operation.

This operation returns true if all items in it are truthy. If one of the items is falsy then this operation will fail fast and not evaluate other operations.

Definition: ["and", <check1: expression(boolean)>, ...<checkN: expression(boolean)>]

Usage

Request:

["and", ["value", true]]

Response:

true

Typical Usage

This value is usually not sent alone to the requests, but it is used as a sub operation for other requests.

Example:

Request:

["ifElse", 
  ["and", ["run", "getUser", 1], ["run", "getUser", 2]], 
  ["value", "There are users 1 and 2"], 
  ["value", "No users found."] 
]

Response:

"There are users 1 and 2"