summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenn Knowles <kenn@kennknowles.com>2014-04-01 10:41:28 -0400
committerKenn Knowles <kenn@kennknowles.com>2014-04-01 10:41:28 -0400
commit87e2aee52ce673b6e9af80818258bc7226467af4 (patch)
tree2500775f38e2a0324e1fd224de226439be4cdda1
parent77ac4572050a8807b068330d3c981c6c4e8c5686 (diff)
parent70e232bd059f9f9a3a03f3a5d31ec8d77e571568 (diff)
downloadjsonpath-rw-87e2aee52ce673b6e9af80818258bc7226467af4.tar.gz
Merge pull request #13 from gera/patch-1
Fix Where to work as advertised
-rw-r--r--jsonpath_rw/jsonpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/jsonpath_rw/jsonpath.py b/jsonpath_rw/jsonpath.py
index 204b54c..3c491d0 100644
--- a/jsonpath_rw/jsonpath.py
+++ b/jsonpath_rw/jsonpath.py
@@ -272,7 +272,7 @@ class Where(JSONPath):
self.right = right
def find(self, data):
- return [subdata for subdata in self.left.find(data) if self.right.find(data)]
+ return [subdata for subdata in self.left.find(data) if self.right.find(subdata)]
def __str__(self):
return '%s where %s' % (self.left, self.right)