title: parse the JSON response from a uri request with Ansible
body: <p>I want to get only names (name1, name2) from this json output with ansible</p>
  <pre><code>{
     &quot;query&quot;:{
        &quot;app&quot;:&quot;app1&quot;,
        &quot;env&quot;:&quot;app2&quot;,
        &quot;type&quot;:&quot;app3&quot;
     },
     &quot;result&quot;:[
        {
           &quot;name&quot;:&quot;name1&quot;,
           &quot;yyy&quot;:&quot;xxxxxxx&quot;,
           &quot;yyy&quot;:[
              &quot;xxx&quot;
           ]
        },
        {
           &quot;name&quot;:&quot;name2&quot;,
           &quot;yyy&quot;:&quot;xxxxxxx&quot;,
           &quot;yyy&quot;:[
              &quot;xxx&quot;
           ]
        }
     ]
  }
  </code></pre>
  <p>This is my task.yml (url/json return the json output)</p>
  <pre><code>uri:
  
    url: &quot;url/json&quot;
    method: GET
    force: yes
    return_content: yes
    status_code:
      - 200
      - 500
  register: registered_variable
  </code></pre>
  <p>So how can I parse this json to get the names. I registered the json output in <code>registered_variable</code>.</p>