-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Eval length()
function returns wrong answer after filtering array
#67
Comments
What I have figured out after tracing the code:
|
Thank you for sharing this! I will try to prepare the fix today ASAP. |
…size` function to provide the count of internal elements of arrays and objects.
Fixed in v0.9.2 |
BTW why the length of null is 1? @spyzhov |
Good point... length of the element is equal to 1, for the reason that the value that you select is always the array, as soon as any JSONPath response is array. What you are asking about... I suppose I should add some new functions, like |
thanks @spyzhov |
The
length()
function inEval()
does not return the correct answer if the array of objects is filtered.In the code snippet below, there is no element in
$.items
that matches the array filtering condition, but the length of the resulting array is still evaluated to 1 instead of 0.The text was updated successfully, but these errors were encountered: