I created a nested dictionary in Python like this:
{ \"Laptop\": { \"sony\": 1 \"apple\": 2 \"asus\": 5 }, \"Came
d = { "Laptop": { "sony": 1, "apple": 2, "asus": 5, }, "Camera": { "sony": 2, "sumsung": 1, "nikon" : 4, }, } with open("my.json","w") as f: json.dump(d,f)