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

Doubt : Is it possible to return all possible path in a dictionary, having a given value through jp filters ? #25

Open
rams3sh opened this issue Aug 29, 2020 · 0 comments

Comments

@rams3sh
Copy link

rams3sh commented Aug 29, 2020

Problem Statement

I have a requirement where I have to search through a raw unstructure non-standard json file and provide all the possible paths which contains a given value.

Example
For a given json

{ 
  "a" : {"a1": ["1","2", {"a2":"IAMHERE"}] },
   "b" : "IAMHERE",
   "c" : {"c1" : {"c2" : {"c3" : {"c4" : "1" , "c5" : "IAMHERE"}}}}
}

For above json and for a given value "IAMHERE" , I would want to get [ "a.a1[2].a2" , "b", "c.c1.c2.c3.c5"] or something similar as those are the paths which has that value.

Also, the structure of the json is not known before hand.

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