title: How to extract the exact output from stdout.lines in ansible
body: <p>My Ansible Playbook:</p>
  
  <pre><code>#Tag --&gt; B.6 --&gt;
    - name: Change the Security Realm to CustomRealm from ManagementRealm
  command: /jboss-as-7.1.1.Final/bin/jboss-cli.sh --connect--command="/core-service=management/management-interface=http-interface:read-attribute(name=security-realm)"
  register: Realm
  
    - debug:
    msg: "{{ Realm.stdout_lines }}"
  </code></pre>
  
  <p>The output for the above command in the message is as follows:</p>
  
  <pre><code>ok: [342f2f7bed8e] =&gt; {
  "msg": [
  "{",
  "    \"outcome\" =&gt; \"success\","
  "    \"result\" =&gt; \"ManagementRealm\"",
  "}"
  ]
  }
  </code></pre>
  
  <p>is there a way to just exact \"result\" => \"ManagementRealm\"".
  I tried using the  </p>
  
  <pre><code>Realm.stdout_lines.find('result')
  </code></pre>
  
  <p>but that fails, AWk &amp; grep commands doesn't seem to be working here.</p>
  
  <p>Any thoughts is greatly appreciated.</p>
  
  <p>Thak you</p>