# How do I get value from an array

**URL:** https://discourse.nodered.org/t/how-do-i-get-value-from-an-array/12267
**Category:** General
**Created:** [15 June 2019 13:52 UTC](https://discourse.nodered.org/t/how-do-i-get-value-from-an-array/12267 "2019-06-15T13:52:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dave/32/10827_2.png) [@Dave](https://discourse.nodered.org/u/Dave)
#### Post date: [15 June 2019 13:52 UTC](https://discourse.nodered.org/t/how-do-i-get-value-from-an-array/12267/1 "2019-06-15T13:52:31Z")

</div>

I have the following array which feeds a to chart node, I want to send it through a function node or a change node and extract "Saturday" to a msg.payload but everything I tried failed I just cannot get it.  
Thought it would be something like msg.payload = msg.payload[0]lables[0]; any help would be appreciated, thanks.

6/15/2019, 2:38:27 PM[node: a69168cd.b4dae8](http://192.168.0.194:1880/#)  
x\_profile : msg : Object  
object  
topic: "x\_profile"  
payload: array[1]  
0: object  
series: array[2]  
data: array[2]  
labels: array[1]  
0: "Saturday"  
qos: 0  
retain: false  
\_msgid: "3d5d3980.b17176"

---

<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: [15 June 2019 13:55 UTC](https://discourse.nodered.org/t/how-do-i-get-value-from-an-array/12267/2 "2019-06-15T13:55:00Z")

</div>

This page in the docs explains how you can use the debug sidebar to find the path to any message element: [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

### Author: ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dave/32/10827_2.png) [@Dave](https://discourse.nodered.org/u/Dave)
#### Post date: [15 June 2019 15:26 UTC](https://discourse.nodered.org/t/how-do-i-get-value-from-an-array/12267/3 "2019-06-15T15:26:25Z")

</div>

That link is great, sorted it straight away thanks.
