Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truthiness of numbers is completely random #664

Open
Ten0 opened this issue Dec 20, 2023 · 0 comments
Open

Truthiness of numbers is completely random #664

Ten0 opened this issue Dec 20, 2023 · 0 comments

Comments

@Ten0
Copy link

Ten0 commented Dec 20, 2023

Using Try.jsonata.org, on the default Invoice template and adding a "cancellation" number field only to the first order object, and filtering on the truthiness of that number:
image
image
image
image
image
image

As you can see that is completely random.
One would expect 0 to be "falsy" and everything else to be "truthy", like in every other language.

It seems to behave fine for true/false/null/""/"foo"/{}...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant