# how to find an item in structure array just by name ??

**URL:** <https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833>\
**Category:** Editor Scripting\
**Tags:** array-nodes, inventory, unreal-engine, Array, item, Blueprint, question\
**Created:** [July 8, 2020, 7:04am UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833 "2020-07-08T07:04:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![HopeVIII](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HopeVIII](https://forums.unrealengine.com/u/HopeVIII)\
**Post date:** [July 8, 2020, 7:04am UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/1 "2020-07-08T07:04:36Z")

</div>

I need help, i have an array called inventory its a structure.  
i want these nodes to set variable called 9mm which is ammo,  
so i need to check the inventory of player and find 9mm item by find (array) to get an index and then  
get a (copy) and break it to get the amount of 9mm inside the inventory and then set the variable.  
but the problem is the amount before find node; that node try to find just 1 item or the amount what i set, so  
when the player have more or less then that it will not find the item, i need to set the amount infinity or  
more then 0 means 1 and more or just find item just by name.  
so how i can make it ??  
this is a screenshot

[[Album] Help ![](https://i.imgur.com/0Mkp7j2.png?fb "Help") ](https://imgur.com/a/lknY15i)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 8, 2020, 8:08am UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/2 "2020-07-08T08:08:31Z")

</div>

Let’s say I want to replenish all 9mm ammo in my inventory and I don’t know / care how many clips there are:

 ![306508-struct.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/3/463e48a17f8791a298dbe3e06136b8f68cc6067a.png)

Does this help?

* * *

You can use additional conditions to filter it down even further:

 ![306522-empties.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/4/9/c49de075f2e01d45915fb1009171248b2f05f1bc.jpeg)

The above will only replenish empty magazines.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 8, 2020, 8:17am UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/3 "2020-07-08T08:17:27Z")

</div>

If you just want to read data, skip SetMember and SetArray.

---

<div class="post-metadata">

**Author:** ![HopeVIII](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HopeVIII](https://forums.unrealengine.com/u/HopeVIII)\
**Post date:** [July 9, 2020, 2:47pm UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/4 "2020-07-09T14:47:43Z")

</div>

Thank you so much, you helped me a lot  
here is the result [- YouTube](https://youtu.be/kgmJTWOixKc)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 9, 2020, 2:58pm UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/5 "2020-07-09T14:58:57Z")

</div>

That looks good! Nice and smooth.

Good luck with the rest.

---

<div class="post-metadata">

**Author:** ![justDaemon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@justDaemon](https://forums.unrealengine.com/u/justDaemon)\
**Post date:** [February 14, 2022, 11:23pm UTC](https://forums.unrealengine.com/t/how-to-find-an-item-in-structure-array-just-by-name/467833/6 "2022-02-14T23:23:13Z")

</div>

Sorry, but the links are no longer available. Can you suggest a solution again?  
Thanks!
