I have a poorly formatted dictionary that uses numbers as keys in a nested dictionary, and not all keys in the top level have the same number of nested items. Example:
{'Option 1': {'0': 'es_LA', '1': 'de_DE', '2': 'fr_FR'}, 'Option 2': {'0': 'de_DE', '1': 'it_IT', '2': 'ja_JP'}}
Desired outcome is something like
{'category': 'Option 1', 'locales': ['es_LA', 'de_DE', 'fr_FR']}, {'category': 'Option 2', 'locales': ['de_DE', 'it_IT', 'ja_JP']}
I know it will involve iterating, but am having a hard time figuring out how to get to that point, since the keys are not all the same. Any help would be appreciated.