# Question about msg.payload to number value for graphs

**URL:** <https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319>\
**Category:** General\
**Created:** [22 April 2020 17:38 UTC](https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319 "2020-04-22T17:38:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bigmike](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@bigmike](https://discourse.nodered.org/u/bigmike)\
**Post date:** [22 April 2020 17:38 UTC](https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319/1 "2020-04-22T17:38:47Z")

</div>

so here is my question:

I want to pull only the counter data out of the payload, convert to number value and feed to graph node. Im a newbie. What nodes or code should i use? best method?

Payload data below:

{"payload":"oCsiAiYANwUBtziKmvw=","message":{"app\_id":"bigmikesnode","dev\_id":"mikeh001","port":0,"confirmed":true,"payload\_raw":"ug=="},"gateway\_id":"eui-b827ebfffe094965","config":{"modulation":"LORA","data\_rate":"SF7BW500","airtime":11584000,"counter":1335,"frequency":923900000,"power":20}}

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [22 April 2020 18:00 UTC](https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319/2 "2020-04-22T18:00:23Z")

</div>

Start by reading the node red docs page Working with Messages. That should get you going.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [22 April 2020 18:33 UTC](https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319/3 "2020-04-22T18:33:42Z")

</div>

... and once you have done that you should be able to use a change node to move the counter property to the payload to feed into the chart.

---

<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:** [21 June 2020 18:33 UTC](https://discourse.nodered.org/t/question-about-msg-payload-to-number-value-for-graphs/25319/4 "2020-06-21T18:33:42Z")

</div>

Closed on 21 June 2020 18:33 UTC

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