# Can't filter Find togheter with with\_sequence

**URL:** <https://forum.ansible.com/t/cant-filter-find-togheter-with-with-sequence/34854>\
**Category:** Ansible Project\
**Created:** [March 25, 2021, 1:53pm UTC](https://forum.ansible.com/t/cant-filter-find-togheter-with-with-sequence/34854 "2021-03-25T13:53:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cornelis\_van\_Ginkel](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@Cornelis\_van\_Ginkel](https://forum.ansible.com/u/Cornelis_van_Ginkel)\
**Post date:** [March 25, 2021, 1:53pm UTC](https://forum.ansible.com/t/cant-filter-find-togheter-with-with-sequence/34854/1 "2021-03-25T13:53:48Z")

</div>

Hi All,

I’m new here and have an issue that gives me a headache 😉  
I’m pretty new to ansible although I did the RH294 course.  
Here’s my playbook:

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 26, 2021, 2:40pm UTC](https://forum.ansible.com/t/cant-filter-find-togheter-with-with-sequence/34854/2 "2021-03-26T14:40:53Z")

</div>

When using a loop your normal results are under a 'results' list, you  
can still used matched, but now you have ONE per item in the mentioned  
list:  
debug:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msg: "{{ find\_result.resuilts[0].matched }}"

^ will give you 'matched' for the first item

to get all matches:

debug: msg={{ find\_result.results|map(attribute='matched')|list }}

^ will show matches per item in a list

change `list` for `sum` to get a total.

---

<div class="post-metadata">

**Author:** ![Cornelis\_van\_Ginkel](https://avatars.discourse-cdn.com/v4/letter/c/ccd318/32.png) [@Cornelis\_van\_Ginkel](https://forum.ansible.com/u/Cornelis_van_Ginkel)\
**Post date:** [March 27, 2021, 7:14pm UTC](https://forum.ansible.com/t/cant-filter-find-togheter-with-with-sequence/34854/3 "2021-03-27T19:14:09Z")

</div>

Thanks for the input, I will give that a go.

With kind regards,

Cornelis
