We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{ "mainkey": { "k1": {}, "k2": {} } }
From above, when I try to get keys with $.mainkey.*~ I expect ["k1","k2"] but I get following error
$.mainkey.*~
["k1","k2"]
Parser failed to understand syntax '$.mainkey.'. error message: Parse error at 1:12 near token ~ ()
Result of pip install --upgrade jsonpath-ng
pip install --upgrade jsonpath-ng
Requirement already satisfied: jsonpath-ng in /usr/local/lib/python3.10/dist-packages (1.5.3) Requirement already satisfied: six in /usr/lib/python3/dist-packages (from jsonpath-ng) (1.16.0) Requirement already satisfied: ply in /usr/local/lib/python3.10/dist-packages (from jsonpath-ng) (3.11) Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from jsonpath-ng) (5.1.1)
The text was updated successfully, but these errors were encountered:
I think would could use something like this instead
obj = { "mainkey": { "k1": {}, "k2": {} } } print(parse("$.mainkey").find(obj)[0].value.keys())
Does jsonpath-ng support tilde? I've only seen it used with =~ for regex filtering I believe
=~
Sorry, something went wrong.
Duplicates #32.
No branches or pull requests
{ "mainkey": { "k1": {}, "k2": {} } }
From above, when I try to get keys with
$.mainkey.*~
I expect
["k1","k2"]
but I get following errorParser failed to understand syntax '$.mainkey.
'. error message:)Parse error at 1:12 near token ~ (
Result of
pip install --upgrade jsonpath-ng
Requirement already satisfied: jsonpath-ng in /usr/local/lib/python3.10/dist-packages (1.5.3)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from jsonpath-ng) (1.16.0)
Requirement already satisfied: ply in /usr/local/lib/python3.10/dist-packages (from jsonpath-ng) (3.11)
Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from jsonpath-ng) (5.1.1)
The text was updated successfully, but these errors were encountered: