# Split value from an object

**URL:** https://discourse.nodered.org/t/split-value-from-an-object/53291
**Category:** General
**Created:** [6 November 2021 12:19 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291 "2021-11-06T12:19:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ramzi1](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Ramzi1](https://discourse.nodered.org/u/Ramzi1)
#### Post date: [6 November 2021 12:19 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/1 "2021-11-06T12:19:05Z")

</div>

![value](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/6/568f5a5ca3c2ac4f2c389ec8ad64a6b69afd3396.jpeg)  
hello!  
i'm new with node red  
i want to know how to sent the value only  
the function in the photo is empty

thanks alot

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [6 November 2021 13:07 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/2 "2021-11-06T13:07:45Z")

</div>

If you want to set/move a value to msg.payload, it would be best to use a change node. using a function node is over kill.  
In the change node -  
1 select `move`  
2 then select `msg` enter the path to the value, in this case it would be `payload.value[0]`. The docs tell you how to get the path [here](https://nodered.org/docs/user-guide/messages).  
3 in the `to` section select `msg` and enter `payload`

If you must use a function node, it would be

```auto
msg.payload = msg.payload.value[0];
return msg;

```

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [6 November 2021 20:28 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/3 "2021-11-06T20:28:18Z")

</div>

> [@Ramzi1](#):
>
> i want to know how to sent the value only

There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.

![BX00Cy7yHi](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd1f333a9e043b061b39917c328b0094d3e52d30.gif)

[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

> [@Ramzi1](#):
>
> i'm new with node red

I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

### Author: ![Ramzi1](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Ramzi1](https://discourse.nodered.org/u/Ramzi1)
#### Post date: [6 November 2021 21:19 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/4 "2021-11-06T21:19:43Z")

</div>

Thank you very much Sir

---

<div class="post-metadata">

### Author: ![Ramzi1](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@Ramzi1](https://discourse.nodered.org/u/Ramzi1)
#### Post date: [6 November 2021 21:20 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/5 "2021-11-06T21:20:32Z")

</div>

Thank you very much Sir!  
I will watch it

---

<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: [20 November 2021 21:21 UTC](https://discourse.nodered.org/t/split-value-from-an-object/53291/6 "2021-11-20T21:21:18Z")

</div>

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