# Updating list of dictionary values from another list

**URL:** <https://forum.ansible.com/t/updating-list-of-dictionary-values-from-another-list/32440>\
**Category:** Ansible Project\
**Created:** [March 11, 2020, 3:50am UTC](https://forum.ansible.com/t/updating-list-of-dictionary-values-from-another-list/32440 "2020-03-11T03:50:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soumya\_dutta](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@soumya\_dutta](https://forum.ansible.com/u/soumya_dutta)\
**Post date:** [March 11, 2020, 3:50am UTC](https://forum.ansible.com/t/updating-list-of-dictionary-values-from-another-list/32440/1 "2020-03-11T03:50:18Z")

</div>

Hi all,  
I have a list of dictionaries where I need to update a value sequentially from another list.  
1st dictionary:  
Xyz:  
&nbsp;&nbsp;1:  
&nbsp;&nbsp;&nbsp;&nbsp;Name: abc  
&nbsp;&nbsp;&nbsp;&nbsp;State:  
&nbsp;&nbsp;2:  
&nbsp;&nbsp;&nbsp;&nbsp;Name: cdf  
&nbsp;&nbsp;&nbsp;&nbsp;State:

Now I have a list as below:  
- ghi  
- uvw  
How can I place the first value in list that is ghi to the dictionary..also ghi should go to first key state value and uvw should go to 2nd key state value.

I need this to be working as dynamically and not static as mentioned.  
I tried with\_indexed\_items but none worked.  
Please help me in resolving this issue.
