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

Use nested queries. #2

Closed
Chutchev opened this issue Oct 12, 2022 · 3 comments
Closed

Use nested queries. #2

Chutchev opened this issue Oct 12, 2022 · 3 comments

Comments

@Chutchev
Copy link

I understand correctly that nested queries have not yet been implemented?

For example:

{
  "name": {"first": "Tom", "last": "Anderson"},
  "age":37,
  "children": ["Sara","Alex","Jack"],
  "fav.movie": "Deer Hunter",
  "friends": [
    {"first": "Dale", "last": "Murphy", "age": 44, "nets": ["ig", "fb", "tw"]},
    {"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]},
    {"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]}
  ]
}

Nested query:

friends.#(nets.#(=="fb"))#.first  >> ["Dale","Roger"]
@volans-
Copy link
Owner

volans- commented Oct 12, 2022

@Chutchev that's correct, sub-queries (or nested queries) have not yet been implemented.
Can I ask you if the note in the supported features matrix for the Queries line is not clear enough and need some additional details?

At the moment I was looking to add support for Multipaths, but of course feature requests are welcome to help prioritize.

@Chutchev
Copy link
Author

Chutchev commented Oct 12, 2022

@volans I did not correlate subqueries-nested queries

Thank you!

volans- added a commit that referenced this issue Oct 22, 2022
* Based on feedback from issue #2.
@volans-
Copy link
Owner

volans- commented Nov 12, 2022

@Chutchev If you're still interested, for your information starting with the v0.4.0 release now gjson-py does support nested queries. I hope this helps.

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