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

Provides the length functionality #137

Closed
ayadav111 opened this issue Aug 11, 2023 · 2 comments
Closed

Provides the length functionality #137

ayadav111 opened this issue Aug 11, 2023 · 2 comments

Comments

@ayadav111
Copy link

Hi,

I am using your library for JSON path filter and I wanted to use length functionality sothat it can provides the length of an array in a given JSON but I couldn't find out.

length() Provides the length of an array Integer

Jayway jsonpath is having this functionality. ref: https://github.com/json-path/JsonPath
Can we have the same here ?
Thank you!

@ohler55
Copy link
Owner

ohler55 commented Aug 11, 2023

Please re-check the documentation https://pkg.go.dev/github.com/ohler55/ojg/jp#Script. The length function is supported in OjG. You can construct a script directly or length(@.x) can be used in a filter expression.

@ohler55
Copy link
Owner

ohler55 commented Aug 16, 2023

Can this be closed?

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

2 participants