Skip to content

Commit 9258b36

Browse files
authored
Merge pull request #41 from josephwhite13/allow-dictionary-filtering
support dictionary filtering
2 parents 0b75d7c + c7d8b75 commit 9258b36

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jsonpath_ng/ext/filter.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def find(self, datum):
4141
return datum
4242

4343
datum = DatumInContext.wrap(datum)
44+
45+
if isinstance(datum.value, dict):
46+
datum.value = list(datum.value.values())
47+
4448
if not isinstance(datum.value, list):
4549
return []
4650

0 commit comments

Comments
 (0)