I saved a nested dictionary to JSON file then load it back. But when I checked my loaded_dictionary.keys() is actually "0" instead of 0 integer.
{ "0": { "Category": "Clothings", "Cost": 100,...
I tried using int() or to_int() but it's not working, eg.
for i in loaded_dictionary.keys():
int(i)
I also tried using str_to_var() and var_to_str() like-
when saving :
var_to_str(dictionary.keys())
when loading back:
str_to_var(loaded_dictionary.keys())
How can I fix this? Thanks.