# Is there a built-in Epic Games solution to foreach TArray objects and call a function on them

**URL:** <https://forums.unrealengine.com/t/is-there-a-built-in-epic-games-solution-to-foreach-tarray-objects-and-call-a-function-on-them/1794149>\
**Category:** Programming & Scripting\
**Tags:** tarray, foreachloop, unreal-engine, question, CPP\
**Created:** [April 8, 2024, 3:24pm UTC](https://forums.unrealengine.com/t/is-there-a-built-in-epic-games-solution-to-foreach-tarray-objects-and-call-a-function-on-them/1794149 "2024-04-08T15:24:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gazee\_puk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gazee_puk/32/917218_2.png) [@gazee\_puk](https://forums.unrealengine.com/u/gazee_puk)\
**Post date:** [April 8, 2024, 3:24pm UTC](https://forums.unrealengine.com/t/is-there-a-built-in-epic-games-solution-to-foreach-tarray-objects-and-call-a-function-on-them/1794149/1 "2024-04-08T15:24:27Z")

</div>

Hi, I was looking for a Epic Games method to foreach elements of a TArray container and call a specific function on them, but i can’t find one for TArray type. There are some similar functions such as [ForEachObjectWithOuter](https://docs.unrealengine.com/4.26/en-US/API/Runtime/CoreUObject/UObject/ForEachObjectWithOuter/), TypedElementListObjectUtil::ForEachObject or [std::for\_each](https://cplusplus.com/reference/algorithm/for_each/). But none of them take TArray as a parameter. Does such method even exist? I don’t find for and foreach loop really convinient personally to my, so I’m looking for an Epic Games alternative
