# ansible find

**URL:** <https://forum.ansible.com/t/ansible-find/28110>\
**Category:** Ansible Project\
**Created:** [July 20, 2018, 7:57pm UTC](https://forum.ansible.com/t/ansible-find/28110 "2018-07-20T19:57:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![metatestingbell2](https://avatars.discourse-cdn.com/v4/letter/m/7ea924/32.png) [@metatestingbell2](https://forum.ansible.com/u/metatestingbell2)\
**Post date:** [July 20, 2018, 7:57pm UTC](https://forum.ansible.com/t/ansible-find/28110/1 "2018-07-20T19:57:34Z")

</div>

Hi,

I have a variable **aaa** , and its content is formatted in json format . I’m trying to run a ‘find’ command on the value of “output” , however i’m not sure how I can just get the value of “output” I tried \*, brackets… with no success

when: aaa.\*.output.find(‘Error’) != -1

`

ok: [77.88.111.33] =\> {  
“msg”: [  
{  
“\_ansible\_item\_result”: true,  
“\_ansible\_no\_log”: false,  
“\_ansible\_parsed”: true,  
“changed”: true,  
“delta”: “0:00:08.218126”,  
“end”: “2018-07-20 15:50:41.544217”,  
“invocation”: {  
“module\_args”: {  
“admin”: true,  
“xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,  
“xxxxxxxxxxxxxxxxxxxx”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,  
“cmd”: “xxxxxxxxxxxxx”  
}  
},  
“item”: {  
“name”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,  
“value”: “both"”  
},  
“ **output** ”: " xxxxxxxxxxxxxxx",  
“start”: “2018-07-20 15:50:33.326091”  
},  
{  
“\_ansible\_item\_result”: true,  
“\_ansible\_no\_log”: false,  
“\_ansible\_parsed”: true,  
“changed”: true,  
“delta”: “0:00:08.425385”,  
“end”: “2018-07-20 15:50:50.489889”,  
“invocation”: {  
“module\_args”: {  
“xxxxx”: true,  
“xxxxxxxxx”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,  
“xxxxx”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,  
“cmd”: “xxxxxxxxxxxxxxx”  
}  
},  
“item”: {  
“name”: “xxxxxxxxxxxxxxxxxxxxxx”,  
“value”: “9”  
},  
“ **output** ”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,  
“start”: “2018-07-20 15:50:42.064504”  
}  
]  
}

`

any tip is appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 24, 2018, 7:45pm UTC](https://forum.ansible.com/t/ansible-find/28110/2 "2018-07-24T19:45:40Z")

</div>

It's a list, the first entry is aaa.0.output and the the second one is aaa.1.output.  
You can't use a wildcard, list is something you usually iterate over so your when makes no sense.
