With 1.7.0
>>> for m in jsonpath_ng.parse('abc.*.def').find({"abc": {"foo": {"def": "bar"}}}): print(m.full_path)
...
abc.foo.def
With 1.8.0:
>>> for m in jsonpath_ng.parse('abc.*.def').find({"abc": {"foo": {"def": "bar"}}}): print(m.full_path)
...
((abc.foo).def)
This is with Python 3.10.14