If the first parameter (boolean) is true, returns the second parameter (T), otherwise returns the third parameter (T).
boolean
T
The type of the second and third parameters must be the same.
{ "id": "MyConfigField", "type": "checkbox",},{ // ... "visible": ["if", ["value", "MyConfigField"], true, false],}, Copy
{ "id": "MyConfigField", "type": "checkbox",},{ // ... "visible": ["if", ["value", "MyConfigField"], true, false],},
If the first parameter (
boolean
) is true, returns the second parameter (T
), otherwise returns the third parameter (T
).