# Hello! Anyone know how to iterate through array (like for each loop node) in Niagara?

**URL:** <https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274>\
**Category:** FX\
**Tags:** unreal-engine, question\
**Created:** [February 2, 2023, 4:03pm UTC](https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274 "2023-02-02T16:03:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Threedking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Threedking](https://forums.unrealengine.com/u/Threedking)\
**Post date:** [February 2, 2023, 4:03pm UTC](https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274/1 "2023-02-02T16:03:40Z")

</div>

On spawn particle i need to compare particle position with the every vectors from array (it’s user parametr).  
I can’t find anything like “for each loop” node in scratch pad of new module(

---

<div class="post-metadata">

**Author:** ![EliasWick](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/eliaswick/32/1175208_2.png) [@EliasWick](https://forums.unrealengine.com/u/EliasWick)\
**Post date:** [February 3, 2023, 8:36am UTC](https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274/2 "2023-02-03T08:36:59Z")

</div>

I am not really sure on what you are trying to do as my knowledge regarding particles are quite limited. Here is howeve how you can use a Niagara system through blueprint to get the Position Array and loop over it.

1. Add a **Niagara Particle System Component**
2. Add it to the grid by dragging and dropping it.
3. Add the other nodes seen in the screenshot below:

 ![bild](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/b/8fb188ff869a9b4bbca300c4ffbfd81011621883.png)

---

<div class="post-metadata">

**Author:** ![OhBriz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ohbriz/32/466374_2.png) [@OhBriz](https://forums.unrealengine.com/u/OhBriz)\
**Post date:** [February 7, 2023, 4:02pm UTC](https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274/3 "2023-02-07T16:02:25Z")

</div>

I believe that in Niagara loops can be done only trough a custom hlsl node

---

<div class="post-metadata">

**Author:** ![Threedking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Threedking](https://forums.unrealengine.com/u/Threedking)\
**Post date:** [February 8, 2023, 1:40pm UTC](https://forums.unrealengine.com/t/hello-anyone-know-how-to-iterate-through-array-like-for-each-loop-node-in-niagara/762274/4 "2023-02-08T13:40:23Z")

</div>

That’s right. I found and used this way
