Spaces:
Running
on
Zero
Running
on
Zero
File size: 248 Bytes
81470e4 |
1 2 3 4 5 6 7 8 9 |
from munch import Munch
def recursive_munch(d):
if isinstance(d, dict):
return Munch((k, recursive_munch(v)) for k, v in d.items())
elif isinstance(d, list):
return [recursive_munch(v) for v in d]
else:
return d |