I want to access session_key from JSON response. In login api I am sending credential it response back with Content-Type: application/json I need to access session_key. How to access session_key for json response.
credential["username"]="john"
credential["password"]="xxx"
response =c.put('/api/login', data=json.dumps(credential))
JSON Respone
print response.content
output
{"message": "", "result": {"username": "john", "session_key": "xyx"}}
When I tried to use print(response.content.result) getting error AttributeError: 'str' object has no attribute 'result'