# Returning data from an array and split then use each value to append a url request

**URL:** https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159
**Category:** General
**Created:** [18 November 2020 18:23 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159 "2020-11-18T18:23:04Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dallibab](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dallibab](https://discourse.nodered.org/u/Dallibab)
#### Post date: [18 November 2020 18:23 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/1 "2020-11-18T18:23:04Z")

</div>

Hi all I am calling an api to return data using http request , I have the data back fine and have used the split sequence to return the values I want from the Array that was generated.

Data comes back as this in the debug window.

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DCF1"

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DMA2"

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DZL4"

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DCR3"

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DHH1"

11/18/2020, 6:15:01 PM[node: SITE LIST](http://127.0.0.1:1880/#)msg.payload : string[4]

"DBB1"

I would like to then do another http request but add my returned value to the url I want to interrogate e.g. [http://mysite/](http://mysite/)"MY STRING"/blahblahblah and run the http request for each value I put into it. but am not sure how to proceed.

Firstly the string being returned is in double quotes" " that I would like to remove but I cant seem to get rid of them using the change node, Im assuming when that is done I set my string as a variable and then inject it into the http request. but am unsure how to do so and how to use each value to trigger a new http request.

I know its pretty simple stuff but I am very new to this and have had a google but cant seem to find what I am looking for.

Can anyone give me some pointers please so I can get this going ( I woud rather not have the full answer just the steps I should follow please so I can try to work the rest out myself.

Thankyou for your time.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [18 November 2020 18:28 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/2 "2020-11-18T18:28:06Z")

</div>

The quotes are only there in the sidebar to help show you it is a string. They are probably not there for real. If you send the debug also to the console you’ll be able to check.

---

<div class="post-metadata">

### Author: ![Dallibab](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dallibab](https://discourse.nodered.org/u/Dallibab)
#### Post date: [18 November 2020 18:31 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/3 "2020-11-18T18:31:00Z")

</div>

You are correct I copied a value and the quotes are not there, thankyou. I didn't think to check, something new learned. do you have any advice on the rest ?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [18 November 2020 18:31 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/4 "2020-11-18T18:31:58Z")

</div>

Then maybe a template node to form up the url as you need to request then an http request node to do the requests etc

---

<div class="post-metadata">

### Author: ![Dallibab](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dallibab](https://discourse.nodered.org/u/Dallibab)
#### Post date: [18 November 2020 18:33 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/5 "2020-11-18T18:33:31Z")

</div>

thanks ill have a google.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [18 November 2020 18:34 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/6 "2020-11-18T18:34:13Z")

</div>

It would be quicker to just try it

---

<div class="post-metadata">

### Author: ![Dallibab](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@Dallibab](https://discourse.nodered.org/u/Dallibab)
#### Post date: [18 November 2020 18:48 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/7 "2020-11-18T18:48:55Z")

</div>

I did, thankyou it worked perfectly.

inject \> http request (to get array of values) \> Split \>Template (to get{{payload}}) then \> Url request with the {{payload}} in the correct place \> Debug

all data comes back just how I wanted it.

Thankyou for your time, much appreciated.

---

<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: [2 December 2020 18:48 UTC](https://discourse.nodered.org/t/returning-data-from-an-array-and-split-then-use-each-value-to-append-a-url-request/36159/8 "2020-12-02T18:48:58Z")

</div>

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