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

Incorrect full path on search - bug #22

Open
moshevi opened this issue Jan 20, 2020 · 1 comment
Open

Incorrect full path on search - bug #22

moshevi opened this issue Jan 20, 2020 · 1 comment

Comments

@moshevi
Copy link

moshevi commented Jan 20, 2020

I think I should get the full paths and values when running this expression {#: $.a.b.c..[?(@.e == 1)]} on this json:

{
  "a": {
       "x": {
           "d":1
       },
       "b": {
           "c": {
               "da" : {
                   "d" : 2
                },
 "db" : {
                   "d" : 1
                },
            }
        }
  }
}

when running this I get this path $["db"] while I should get the full path which is $["a"]["b"]["c"]["db"]

I can run this expression {#: $..[?(@.e == 1)]} but I don't want to search the all tree and get also the $["a"]["x"] path, just what under a.b.c hierarchy
Is there a fix for that?

@moshevi moshevi changed the title Get full path on search full path on search bug Jan 28, 2020
@moshevi moshevi changed the title full path on search bug Incorrect full path on search - bug Jan 28, 2020
@moshevi
Copy link
Author

moshevi commented Jan 28, 2020

Is there a planned fix for that?

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