# Extract a Value

**URL:** <https://discourse.nodered.org/t/extract-a-value/9081>\
**Category:** General\
**Created:** [17 March 2019 12:20 UTC](https://discourse.nodered.org/t/extract-a-value/9081 "2019-03-17T12:20:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex2](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@alex2](https://discourse.nodered.org/u/alex2)\
**Post date:** [17 March 2019 12:20 UTC](https://discourse.nodered.org/t/extract-a-value/9081/1 "2019-03-17T12:20:59Z")

</div>

Hello,  
I have this payload (http get) How can I extract the Value for "PAC"

{  
"Body" : {  
"Data" : {  
"DAY\_ENERGY" : {  
"Unit" : "Wh",  
"Value" : 8718  
},  
"DeviceStatus" : {  
"ErrorCode" : 0,  
"LEDColor" : 2,  
"LEDState" : 0,  
"MgmtTimerRemainingTime" : -1,  
"StateToReset" : false,  
"StatusCode" : 7  
},  
"FAC" : {  
"Unit" : "Hz",  
"Value" : 49.990000000000002  
},  
"IAC" : {  
"Unit" : "A",  
"Value" : 14.470000000000001  
},  
"IDC" : {  
"Unit" : "A",  
"Value" : 7.5300000000000002  
},  
"PAC" : {  
"Unit" : "W",  
"Value" : 3371  
},  
"TOTAL\_ENERGY" : {  
"Unit" : "Wh",  
"Value" : 608459.06000000006  
},  
"UAC" : {  
"Unit" : "V",  
"Value" : 232.09999999999999  
},  
"UDC" : {  
"Unit" : "V",  
...

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [17 March 2019 12:28 UTC](https://discourse.nodered.org/t/extract-a-value/9081/2 "2019-03-17T12:28:01Z")

</div>

See [Msg.payload to influxdb](https://discourse.nodered.org/t/msg-payload-to-influxdb/9066/2)

---

<div class="post-metadata">

**Author:** ![alex2](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@alex2](https://discourse.nodered.org/u/alex2)\
**Post date:** [17 March 2019 13:00 UTC](https://discourse.nodered.org/t/extract-a-value/9081/3 "2019-03-17T13:00:46Z")

</div>

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

---

<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:** [17 March 2019 13:30 UTC](https://discourse.nodered.org/t/extract-a-value/9081/4 "2019-03-17T13:30:08Z")

</div>

Hi @alex2,

That shows your message is a JSON string. The first step is to convert that to a JavaScript object so you can access its contents.

Add a JSON node to your flow.

You can then use the debug sidebar to help you identify the right path to the element you are interested in.

This page of the docs should help explain how to do that: [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![alex2](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@alex2](https://discourse.nodered.org/u/alex2)\
**Post date:** [17 March 2019 13:38 UTC](https://discourse.nodered.org/t/extract-a-value/9081/5 "2019-03-17T13:38:00Z")

</div>

Thank you
