if-exists
The if-exists
Instruction conditionally executes a nested lists of Instructions depending on whether a named input value exists in the current Record in the input data.
action |
"if-exists" |
source |
The property in the input Record. |
then |
An array of Instructions to be executed when the value exists in the Record (optional). |
else |
An array of Instructions to be executed when the value does not exist in the Record (optional). |
See also if-has-value
and if-value-one-of
.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | { "action" : "if-exists" , "source" : "supervisors" , "then" : [ { "action" : "set-value" , "destination" : "user" , "name" : "groups" , "value" : "example:group:student" } ], "else" : [ // ... ] } |