Spaces:
Running
on
Zero
Running
on
Zero
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 |