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

why select always returns a vector? How to use this for single return value? #45

Open
coding-yogi opened this issue Apr 6, 2020 · 0 comments

Comments

@coding-yogi
Copy link

All examples for this library are around vectors. Not a single example shows how to fetch just a specific value from json using jsonpath. If select returns vector everytime, how would program know if returned value was actually an json array or json value?

Also there is incosistency in the results returned by select and select_as_str

I have below json. For json path $.args.foo1, select_as_str() returns "[\"bar1\"]" which is ofcourse wrong and select() doesn't return anything!! but empty array

{
    "args": {
        "foo1": "bar1",
        "foo2": "bar2"
    }
}
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