# Iteration over msg

**URL:** <https://forum.ansible.com/t/iteration-over-msg/30422>\
**Category:** Ansible Project\
**Created:** [May 25, 2019, 1:21pm UTC](https://forum.ansible.com/t/iteration-over-msg/30422 "2019-05-25T13:21:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rama](https://avatars.discourse-cdn.com/v4/letter/r/ccd318/32.png) [@Rama](https://forum.ansible.com/u/Rama)\
**Post date:** [May 25, 2019, 1:21pm UTC](https://forum.ansible.com/t/iteration-over-msg/30422/1 "2019-05-25T13:21:25Z")

</div>

Hi All,

I have a playbook ran and got desired below output. Could anyone please help me how to iterate and get the Fan block which status is degraded.

TASK [debug] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/dev/test.yml:13  
ok: [localhost] =\> {  
“msg”: {  
“Fan Block 1”: {  
“label”: “Fan Block 1”,  
“speed”: [  
94,  
“Percentage”  
],  
“status”: “OK”,  
“zone”: “System”  
},  
“Fan Block 2”: {  
“label”: “Fan Block 2”,  
“speed”: [  
94,  
“Percentage”  
],  
“status”: “Degraded”,  
“zone”: “System”  
},  
“Fan Block 3”: {  
“label”: “Fan Block 3”,  
“speed”: [  
94,  
“Percentage”  
],  
“status”: “OK”,  
“zone”: “System”  
},  
}  
}
