# How to convert these ;'

**URL:** <https://discourse.nodered.org/t/how-to-convert-these/17488>\
**Category:** General\
**Created:** [4 November 2019 16:06 UTC](https://discourse.nodered.org/t/how-to-convert-these/17488 "2019-11-04T16:06:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![redlop](https://avatars.discourse-cdn.com/v4/letter/r/59ef9b/32.png) [@redlop](https://discourse.nodered.org/u/redlop)\
**Post date:** [4 November 2019 16:06 UTC](https://discourse.nodered.org/t/how-to-convert-these/17488/1 "2019-11-04T16:06:57Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/6/6cbe52e90f42e3e50578d9aaafa2b1c1a4204192.png)

Hi, how do i extract the message payload only? I'm using the merge node currently and this is what im getting. im thinking of using the function node but i dont know how to code it to extract the value.

---

<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:** [4 November 2019 16:42 UTC](https://discourse.nodered.org/t/how-to-convert-these/17488/2 "2019-11-04T16:42:55Z")

</div>

The documentation explains how to work with messages  
[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<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:** [4 November 2019 20:20 UTC](https://discourse.nodered.org/t/how-to-convert-these/17488/3 "2019-11-04T20:20:13Z")

</div>

So you have an example of a JavaScript array of objects. You need to start by getting a little understanding of their structure and how to work with them.

Arrays use array syntax: `msg.payload[0]`. Objects use object syntax `msg.payload` or `msg["payload"]`.

You can, of course, combine the 2.
