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