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

Can you provide support to get the property names #417

Open
ceepan opened this issue Dec 4, 2017 · 4 comments
Open

Can you provide support to get the property names #417

ceepan opened this issue Dec 4, 2017 · 4 comments

Comments

@ceepan
Copy link

ceepan commented Dec 4, 2017

Looking at https://github.com/s3u/JSONPath it allow the use of the tilde character to get all of the property names. Example is taking the following JSON:

{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
},
{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "fiction",
"author": "Herman Melville",
"title": "Moby Dick",
"isbn": "0-553-21311-3",
"price": 8.99
},
{
"category": "fiction",
"author": "J. R. R. Tolkien",
"title": "The Lord of the Rings",
"isbn": "0-395-19395-8",
"price": 22.99
}
],
"bicycle": {
"color": "red",
"price": 19.95
}
}
}

and using the JSONPath expression "$.store.*~" to return "["book","bicycle"]"

The implementation behind http://jsonpath.com/ supports this functionality

@pavelkostyurin
Copy link

Any hope of implementing this feature?

@Shirinrpatel-zz
Copy link

Hey guys, can someone please look into this? thanks

@miparnisari
Copy link

Looks like a duplicate of #439

@fghber
Copy link

fghber commented Nov 15, 2020

Looks like a duplicate of #439

Agreed. Arguably, this is a generalization of #439 i.e. get the property name anywhere.

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

5 participants