# Help me about payload

**URL:** <https://discourse.nodered.org/t/help-me-about-payload/15877>\
**Category:** General\
**Created:** [25 September 2019 07:36 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877 "2019-09-25T07:36:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Veloruze](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@Veloruze](https://discourse.nodered.org/u/Veloruze)\
**Post date:** [25 September 2019 07:36 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/1 "2019-09-25T07:36:44Z")

</div>

i've 2 same payloads in the same time like this

> ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1656f2b626fe4f65017282ab011d7b043fa1ac7b.png)

what i want is make first payload to payload.first and second payload to payload.second.  
can someone help me ?

```auto
[{"id":"a8c021c4.dfc1c","type":"inject","z":"b9c42b46.292c88","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":160,"wires":[["a7e5c23f.8f465"]]},{"id":"a7e5c23f.8f465","type":"http request","z":"b9c42b46.292c88","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://www.n2yo.com/rest/v1/satellite/tle/44048&apiKey=4LW4JM-WQ9W8J-YZJJE9-47FR","tls":"","proxy":"","authType":"","x":270,"y":160,"wires":[["65e01ad6.261d04"]]},{"id":"65e01ad6.261d04","type":"function","z":"b9c42b46.292c88","name":"","func":"msg.payload = msg.payload.tle;\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":160,"wires":[["f83b2e74.84f3d"]]},{"id":"f83b2e74.84f3d","type":"split","z":"b9c42b46.292c88","name":"","splt":"\\r\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":530,"y":160,"wires":[["83372a3e.556968"]]},{"id":"83372a3e.556968","type":"debug","z":"b9c42b46.292c88","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":720,"y":160,"wires":[]}]

```

Sorry for my bad english T\_T

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [25 September 2019 07:43 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/2 "2019-09-25T07:43:05Z")

</div>

Can you copy and paste the text itself here?

---

<div class="post-metadata">

**Author:** ![Veloruze](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@Veloruze](https://discourse.nodered.org/u/Veloruze)\
**Post date:** [25 September 2019 07:46 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/3 "2019-09-25T07:46:43Z")

</div>

i send the code. wait...

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [25 September 2019 07:49 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/4 "2019-09-25T07:49:29Z")

</div>

You have two different payloads and you want them both in the same message?

Take a look at this example in the cookbook  
[https://cookbook.nodered.org/basic/join-streams](https://cookbook.nodered.org/basic/join-streams)

which would get them into the same message  
You can then use the change node to rename them

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [25 September 2019 08:00 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/5 "2019-09-25T08:00:14Z")

</div>

Try this

```auto
[{"id":"7032d07e.ac87e8","type":"inject","z":"d9b461a2.a6f6d8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":108,"y":264,"wires":[["760f593d.abdc38"]]},{"id":"760f593d.abdc38","type":"http request","z":"d9b461a2.a6f6d8","name":"","method":"GET","ret":"obj","paytoqs":false,"url":"https://www.n2yo.com/rest/v1/satellite/tle/44048&apiKey=4LW4JM-WQ9W8J-YZJJE9-47FR","tls":"","proxy":"","authType":"","x":258,"y":264,"wires":[["57b82f0e.7b88f"]]},{"id":"57b82f0e.7b88f","type":"function","z":"d9b461a2.a6f6d8","name":"","func":"m = msg.payload.tle;\n\no = m.split(\"\\n\")\n\nreturn {payload:{first:o[0],second:o[1]}}\n\n","outputs":1,"noerr":0,"x":410,"y":264,"wires":[["c03a07bb.cf637"]]},{"id":"c03a07bb.cf637","type":"debug","z":"d9b461a2.a6f6d8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":554,"y":264,"wires":[]}]

```

note - your API key is in here, make sure to change it.

---

<div class="post-metadata">

**Author:** ![Veloruze](https://avatars.discourse-cdn.com/v4/letter/v/58f4c7/32.png) [@Veloruze](https://discourse.nodered.org/u/Veloruze)\
**Post date:** [25 September 2019 08:00 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/6 "2019-09-25T08:00:29Z")

</div>

my output is in msg.payload what i want is change it to msg.payload.first.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 September 2019 12:33 UTC](https://discourse.nodered.org/t/help-me-about-payload/15877/7 "2019-09-25T12:33:34Z")

</div>

If you are using the change node, add an extra change before the others to turn the payload into an object. Then you can follow up with further changes to add the properties you want to the payload object. Alternatively, if you are comfortable with JavaScript, you can use a function node.
