Skip to content

Commit 70e232b

Browse files
committed
Fix Where to work as advertised
This actually uses the right expression to filter the selected subdata and not just match on the whole data which just determines if there will be any output at all or not.
1 parent 034b9ec commit 70e232b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jsonpath_rw/jsonpath.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __init__(self, left, right):
272272
self.right = right
273273

274274
def find(self, data):
275-
return [subdata for subdata in self.left.find(data) if self.right.find(data)]
275+
return [subdata for subdata in self.left.find(data) if self.right.find(subdata)]
276276

277277
def __str__(self):
278278
return '%s where %s' % (self.left, self.right)

0 commit comments

Comments
 (0)