I have a dataset which might have n level of ordered dictionary of ordered dictionaries,Now i need to convert all of them into normal dictionaries,Is there a easier method to do other than recursive search and conversion.
from collections import OrderedDict
an=OrderedDict([('method', 'constant'), ('data', '1.225')])
aw=OrderedDict([('method', 'constant'), ('data', OrderedDict([('1.225','777')]))])
print dict(an)
print dict(aw)
{'data': '1.225', 'method': 'constant'}
{'data': OrderedDict([('1.225', '777')]), 'method': 'constant'}