jsonpath icon indicating copy to clipboard operation
jsonpath copied to clipboard

Incorrect full path on search - bug

Open moshevi opened this issue 6 years ago • 1 comments

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 avatar Jan 20 '20 07:01 moshevi

Is there a planned fix for that?

moshevi avatar Jan 28 '20 19:01 moshevi