json - Access the string value from a Dictionary -
i have following code :
a= {'b': '{"c":46, "d": 1}', 'e': 10}
here need value of "c"
in dictionary inside dictionary, value of 'b'
dictionary in string format.
thanks in advance..!!
you have decode string value json format python object following (using python's json module):
import json b_value = json.loads(a['b']) # decode value json string c_value = b_value['c'] # use/access value