switch
This block is part of the object group and was last modified in core v12.0.4.
switch v12.0.4 Returns a object based of the given expression.
In pins 2
- expression required
valueThe expression to evaluate.
- default
objectThe default statement to be executed.
Out pins 2
- output
objectReturns the object matching the expression.
- match
conditionReturns true in case a match was found.
Data selector: stringifies the expression value and compares it for exact STRING equality against each case pin's label; outputs the matching case's object with matched=true, else the default input with matched=FALSE (default never counts as a match). No match and no default yields object=nil. Only the winning input's pure-data chain is evaluated.
A typical wiring for switch: the object out pin feeds custom field.

Version history
Introduced in v12.0.4.
Back to
object Return to the main group to view all sub-groups Back to object Return to the group to view all blocks within this group
