test_string = '{"Nikhil":{"Akshat" : ["a":2, "fs":1]}}'
Want to convert to dict = {"Nikhil":{"Akshat" : ["a":2, "fs":1]}}
Found this post: Convert a String representation of a Dictionary to a dictionary
But won't work using ast or json.loads(test_string). It seems that it's the list ["a":2, "fs":1]
cause problems. Could someone please provide suggestions on it?
Thank you.
corrected, should be this test_string = '{"Nikhil":{"Akshat" : [{"a":2, "fs":1}]}}'