# return values of dictionary fields using j2

**URL:** <https://forum.ansible.com/t/return-values-of-dictionary-fields-using-j2/23000>\
**Category:** Ansible Project\
**Created:** [November 10, 2016, 2:20pm UTC](https://forum.ansible.com/t/return-values-of-dictionary-fields-using-j2/23000 "2016-11-10T14:20:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alix\_Ak](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Alix\_Ak](https://forum.ansible.com/u/Alix_Ak)\
**Post date:** [November 10, 2016, 2:20pm UTC](https://forum.ansible.com/t/return-values-of-dictionary-fields-using-j2/23000/1 "2016-11-10T14:20:59Z")

</div>

hallo all,

i have defined following variables in my playbook:

---

<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:** [November 10, 2016, 2:32pm UTC](https://forum.ansible.com/t/return-values-of-dictionary-fields-using-j2/23000/2 "2016-11-10T14:32:33Z")

</div>

{% for key, value in ip.iteritems() %} {{ value }} {% endfor %}

To read more about it  
[http://jinja.pocoo.org/docs/dev/templates/#for](http://jinja.pocoo.org/docs/dev/templates/#for)

---

<div class="post-metadata">

**Author:** ![Alix\_Ak](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@Alix\_Ak](https://forum.ansible.com/u/Alix_Ak)\
**Post date:** [November 10, 2016, 5:38pm UTC](https://forum.ansible.com/t/return-values-of-dictionary-fields-using-j2/23000/3 "2016-11-10T17:38:11Z")

</div>

Thanks alot ^^
