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

$ != $[] #10

Open
rayozzie opened this issue Nov 22, 2021 · 0 comments
Open

$ != $[] #10

rayozzie opened this issue Nov 22, 2021 · 0 comments

Comments

@rayozzie
Copy link

rayozzie commented Nov 22, 2021

In try.jsonata.org, the following evaluate identically as a way of demoting the entire source object into a field.

{
"event":$[0]
}

...and...

{
"event":$[]
}

...are equivalent to...

{
"event":$
}

In jsonata-go, $[0] does what one would expect, but the others do not.

tbal999 added a commit to tbal999/jsonata-go that referenced this issue May 14, 2023
* add eval functionality

* a more fancy eval

* fixes

* fully fleshed out eval

* update

---------

Co-authored-by: tbal999 <tom@fern91.com>
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