Skip to main content

$$boolean

Evaluates input to boolean using the Truthy logic

Strings evaluation depends on style argument:

  • By default, value must be "true" for true.
  • Unless style is set to JS, then any non-empty value is true. Arrays and objects of size 0 returns false.

Usage​

{
"$$boolean": /* value */,
"style": "JAVA"
}
"$$boolean([style]):{input}"

Returns​

boolean

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
styleEnumJAVA/JSJAVAStyle of considering truthy values (JS only relates to string handling; not objects and arrays)

Examples​

Input

Definition

Output

5
"$$boolean:$"
true
"true"
"$$boolean:$"
true
"yes"
"$$boolean:$"
false
"yes"
"$$boolean(JS):$"
true