# Help updating object in array

**URL:** <https://community.weweb.io/t/help-updating-object-in-array/14899>\
**Category:** How do I?\
**Created:** [December 10, 2024, 11:28pm UTC](https://community.weweb.io/t/help-updating-object-in-array/14899 "2024-12-10T23:28:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mino](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@mino](https://community.weweb.io/u/mino)\
**Post date:** [December 10, 2024, 11:28pm UTC](https://community.weweb.io/t/help-updating-object-in-array/14899/1 "2024-12-10T23:28:11Z")

</div>

I have an array of objects. How do find and update the object with a new object? And if the object doesn’t exist, create it?

[  
{  
“question\_id”: 2,  
“user\_choice”: “choice1”  
},  
{  
“question\_id”: 9,  
“user\_choice”: “choice2”  
},  
{  
“question\_id”: 7,  
“user\_choice”: “choice3”  
},  
{  
“question\_id”: 1,  
“user\_choice”: “choice4”  
},  
{  
“question\_id”: 5,  
“user\_choice”: “choice5”  
}  
]

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [December 11, 2024, 7:32am UTC](https://community.weweb.io/t/help-updating-object-in-array/14899/2 "2024-12-11T07:32:53Z")

</div>

You need to use the Change variable value → Update one item → Partial
