# Execute HTTP request for each element in array

**URL:** https://discourse.nodered.org/t/execute-http-request-for-each-element-in-array/58751
**Category:** General
**Tags:** http-request, function-node
**Created:** [21 February 2022 14:28 UTC](https://discourse.nodered.org/t/execute-http-request-for-each-element-in-array/58751 "2022-02-21T14:28:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![TimKuijpers2002](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/timkuijpers2002/32/57077_2.png) [@TimKuijpers2002](https://discourse.nodered.org/u/TimKuijpers2002)
#### Post date: [21 February 2022 14:28 UTC](https://discourse.nodered.org/t/execute-http-request-for-each-element-in-array/58751/1 "2022-02-21T14:28:41Z")

</div>

Hello everyone, I just started working with Node-Red and I love the simplicity about it.  
But due to the simplicity, I am unable to find an answer to my question "Is it possible, to execute an HTTP request for each element in an array?".

In my scenario, I have an array of id's, and I would like to have one object containing all objects connected to these id's. I just can't seem to figure out how to GET all these objects, since (in my view) I am only able to use one query-string parameter in my URL.

Could someone please help me with this? I thank you all for your time!

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [21 February 2022 15:29 UTC](https://discourse.nodered.org/t/execute-http-request-for-each-element-in-array/58751/2 "2022-02-21T15:29:39Z")

</div>

Use a Split node to turn your one message into a sequence of messages - one for each element in the array. You can then pass them to an http request node to make the individual requests, and then use a Join node to recombine the message sequence back into a single message.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [22 April 2022 15:30 UTC](https://discourse.nodered.org/t/execute-http-request-for-each-element-in-array/58751/3 "2022-04-22T15:30:21Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
