-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Filter might return duplicate results when the internal objects are similar.
e.g. input JSON both objects have name == {"first":"A","middle":"A"}
[{{"name":{"first":"A","middle":"A"},"rank":8},{"name":{"first":"A","middle":"A"},"rank":90}]
When running:
$[?($.name.first=="A")]
The following result is returned:
[{{"name":{"first":"A","middle":"A"},"rank":8},{"name":{"first":"A","middle":"A"},"rank":8},{{"name":{"first":"A","middle":"A"},"rank":90},{"name":{"first":"A","middle":"A"},"rank":90}]
It seems like the bug is in this code which compares all the candidates with all values and return each "parent" twice.
jsonpath/src/select/expr_term.rs
Line 107 in 1a84c5a
for result_value in &ret { |
Metadata
Metadata
Assignees
Labels
No labels