Context Operators
Operators | Instruction |
---|---|
var | var |
missing | missing |
missing_some | missing_some |
These operators allow you to fetch data from the context & check for the existence of values.
Additionally, these operators support handlebars style data traversal inside of higher order operators (next page).
var
By just using
''
as the input for var, you can get the current value that is in scope, regardless of its type.If you wish, you can drill down and fetch specific properties:
Missing
Returns an array of the values that are "missing"
Missing Some
From
json-logic-js
, passing in the number of required variables & the variable names, if it has enough of them, it'll return an empty array, otherwise it'll return the items that are missing.