title: Ansible loop returns outputs entire object
body: <p>I am gathering information about AWS ec2 instances and then attempting to loop through them to output the instance_id property of the registered results. </p>
  
  <p>When I run through the loop I get the expected results, but I also get the entire registered object outputted as well. It appears to flatten the object to a string and output it. What is the reason for the additional output and is there a better loop method I should use?</p>
  
  <p>Thank you in advance!</p>
  
  <pre><code>---
  - hosts: localhost
    gather_facts: false
    connection: local
  
    tasks:
      - name: get ec2 instance info
        ec2_instance_info:
          region: us-east-1
          filters:
            "tag:app": ansible
            "tag:env": dev
        register: ec2
  
      - debug:
          msg: "{{ item['instance_id'] }}"
        loop: "{{ ec2['instances'] }}"
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/KggT5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KggT5.png" alt="extra output"></a></p>
  
  <p><strong>FIX</strong></p>
  
  <pre><code>- debug:
      msg: "{{ item['instance_id'] }}"
    loop: "{{ ec2['instances'] }}"
    loop_control:
      label: "{{ item.instance_id }}"
  </code></pre>