# How do I replace a specific item in an array

**URL:** <https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879>\
**Category:** How do I?\
**Tags:** workflows, filter, xano, weweb\
**Created:** [September 27, 2024, 5:05pm UTC](https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879 "2024-09-27T17:05:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [September 27, 2024, 5:05pm UTC](https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879/1 "2024-09-27T17:05:21Z")

</div>

Lets say I have 9 images in an array and I want to replace image 5 with a different image.  
Does anyone know how I would go about that or if its possible? If there is a tutorial of some kind I would appreciate it because I am a bit lost here.

For more detail I am using file upload advanced, Google cloud and xano. Its not set up yet but I figure the images are sent to GCS then the url to xano which will be displayed in weweb.

Any help would be appreciated.

---

<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:** [September 27, 2024, 7:41pm UTC](https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879/2 "2024-09-27T19:41:19Z")

</div>

`array[4] = new_value` should do, for the 5th item it’s index number 4, because computers count from 0

 ![Screenshot 2024-09-27 at 21.41.58](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f85d08fc7b3605612f300ace23591faec1010a25.png)

---

<div class="post-metadata">

**Author:** ![metalsteve81](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@metalsteve81](https://community.weweb.io/u/metalsteve81)\
**Post date:** [September 27, 2024, 8:37pm UTC](https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879/3 "2024-09-27T20:37:39Z")

</div>

Thank you but I have almost no idea what this is 😅 I think you might be a bit smarter than me.

How would I implement this in weweb so the user can replace a specific image?

This might be an easier question for office hours so I can walk through my setup

---

<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:** [September 28, 2024, 6:54am UTC](https://community.weweb.io/t/how-do-i-replace-a-specific-item-in-an-array/12879/4 "2024-09-28T06:54:52Z")

</div>

Sorry yes, you need to go to the Change variable value → Update one item and the item index should be (the order of your item in the array - 1)
