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

Search for property? #111

Open
davaya opened this issue Oct 5, 2022 · 0 comments
Open

Search for property? #111

davaya opened this issue Oct 5, 2022 · 0 comments

Comments

@davaya
Copy link

davaya commented Oct 5, 2022

Is it possible to search for a specific property regardless of where it appears in the tree? Given a JSON document

{
  "foo": 1,
  "a": {
    "foo": 2,
    "b": {
      "foo": 3,
      "bar": 4,
      "baz": 5
    }
  }
}

I want to find all occurrences of property foo without a-priori knowledge of the document structure, yielding the same results as grepping the JSON data or using DOM querySelectorAll():
["foo", "a.foo", "a.b.foo"]

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