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

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -