JsonUtils.asBool Function

Get a value as a boolean.

asBool(json: any, defaultVal: boolean = false): boolean

Parameter Type Description
json any the input JSON object
defaultVal boolean default value if json cannot be converted to boolean

Returns - boolean

the value of json as a boolean, or default value

Defined in

Last Updated: 11 June, 2024