-
Notifications
You must be signed in to change notification settings - Fork 254
Closed
Description
Just a query. I wanted something that returns "true" if a arg path evaluates to truthy, and "false" if falsey or not found (no match).
data:
{
"_formValues": {
"test": true
}
}
Jsonata expressiosn:
$not(_formValues.test) returns false
$not(_formValues.test2) returns true
But:
$boolean(_formValues.test) returns true
$boolean(_formValues.test2) returns *no match*
I found it a bit inconsistent that a $boolean(arg) can return *no match*. Should it be returning false instead when hit against a no match? Or perhaps someone can explain why this is perfectly good and logical :)
Using: Jsonata 1.8.2 (as in the exerciser)
Metadata
Metadata
Assignees
Labels
No labels