Incorrect lookup of parent node for % operator
eschava opened this issue · 0 comments
eschava commented
Please check the example below
Data:
[{
"parent": "a",
"children": [{ "child": "c1"}, {"child": "c2"}]
}, {
"parent": "b",
"children": [{"child": "c1"}]
}]
Query
$.children.{'parent': %.parent, 'child': child}
produces
[ {
"parent" : "b",
"child" : "c1"
}, {
"parent" : "a",
"child" : "c2"
}, {
"parent" : "b",
"child" : "c1"
} ]
So for the first child of the "parent:a" node it finds another parent (perhaps because the child node is absolutely equal)