Skip to content

Commit c7d8b75

Browse files
author
jmw398
committed
if datum.value is a dictionary, filter on the list of values
1 parent d4b8b87 commit c7d8b75

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
@@ -40,6 +40,10 @@ def find(self, datum):
4040
return datum
4141

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

0 commit comments

Comments
 (0)