title: How to inspect a json response from Ansible URI call
body: <p>I have a service call that returns system status in <code>json</code> format. I want to use the ansible <a href="http://docs.ansible.com/ansible/uri_module.html" rel="noreferrer">URI</a> module to make the call and then inspect the response to decide whether the system is up or down</p>
  
  <pre><code>{"id":"20161024140306","version":"5.6.1","status":"UP"}
  </code></pre>
  
  <p>This would be the <code>json</code> that is returned </p>
  
  <p>This is the ansible task that makes a call:</p>
  
  <pre><code> - name: check sonar web is up
     uri:
      url: http://sonarhost:9000/sonar/api/system/status
      method: GET
      return_content: yes
      status_code: 200
      body_format: json
      register: data
  </code></pre>
  
  <p>Question is how can I access <code>data</code> and inspect it as per ansible documentation this is how we store results of a call. I am not sure of the final step which is to check the status.</p>