Conditional

Switch

A function of the expression language. Category: Conditional. switch.

Function
switch
switch({ branches: { type: "array", data: { type: "object", data: { case: anyBooleanExpression, then: anyExpression } }[] }, default: anyExpression })

Its result can be used where the editor expects a value of these types.

  • list
  • boolean
  • number
  • object
  • text

More in Functions.

Arguments

branchesany valueRequired

defaultany valueRequired

Was this page helpful?