python - Parse the ouput of a variable -


i have following variable,i need parse value in errormessage,can suggest how it?

message ={"value":1,"errormessage":null,"text":{"result":"<requestgroupid>11647</requestgroupid><requestid>34382</requestid>"}}  expected output:- null 

that json string. need use json.loads parse , convert dictionary first.

import json ob = json.loads(message) print(ob["errormessage"]) 

though give none, not null.


Comments

Popular posts from this blog

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

ios - retrievePeripherals deprecated in IOS7 how to substitude it with retrievePeripheralsWithIdentifiers -