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

Incorrect results for positional variable operator '#' on input arrays #382

Closed
andrew-coleman opened this issue Oct 25, 2019 · 0 comments · Fixed by #383
Closed

Incorrect results for positional variable operator '#' on input arrays #382

andrew-coleman opened this issue Oct 25, 2019 · 0 comments · Fixed by #383
Labels

Comments

@andrew-coleman
Copy link
Member

The # operator introduced in v1.7.0 is not working as designed for input JSON with top-level arrays. For example, the expression $#$pos[$pos < 3] is saying 'bind the variable $pos to the position (index) of each value in the input array, then filter the results to contain only those with index less than 3'. When applied to the input array [3,1,4,1,5,9], it should return [3,1,4]. However, in v1.7.0, it is returning nothing. This expression is equivalent to the expression $[[0..2]], which returns the correct [3,1,4].

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

Successfully merging a pull request may close this issue.

1 participant