# Payload address has a decimal (period)

**URL:** https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899
**Category:** General
**Created:** [25 January 2024 01:24 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899 "2024-01-25T01:24:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jdexmchine](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jdexmchine](https://discourse.nodered.org/u/jdexmchine)
#### Post date: [25 January 2024 01:24 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899/1 "2024-01-25T01:24:49Z")

</div>

Hello,

I am receiving these data from a sensor:

{  
"pm25": 27,  
"pm10": 30,  
"pm1.0": 20,  
"temperature": 17.5,  
"humidity": 35.5  
}

I have success in getting the data using below code, as an example:

var newMsg = { payload: msg.payload.pm10 };

My problem comes from the data for pm1.0, I cannot type

var newMsg = { payload: msg.payload.pm1.0 };

As the "." will be like a separator. Tried doing this but still does not work:

var newMsg = { payload: msg.payload."pm1.0" };

A bit new to Node-red, not really sure how to resolve this. Big thanks to anyone who will help!

---

<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: [25 January 2024 01:31 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899/2 "2024-01-25T01:31:24Z")

</div>

There’s a great page in the docs ([Working with messages : Node-RED](https://nodered.org/docs/user-guide/messages)) 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)

---

<div class="post-metadata">

### Author: ![jdexmchine](https://avatars.discourse-cdn.com/v4/letter/j/df705f/32.png) [@jdexmchine](https://discourse.nodered.org/u/jdexmchine)
#### Post date: [25 January 2024 01:33 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899/3 "2024-01-25T01:33:38Z")

</div>

Hi Steve,

Thanks a lot, very helpful for me.

By the way, just found the solution to my problem, I just needed to change the code to this:  
var newMsg = { payload: msg.payload["pm1.0"] };

Thanks!

---

<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: [25 January 2024 09:36 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899/4 "2024-01-25T09:36:22Z")

</div>

> [@jdexmchine](#):
>
> By the way, just found the solution to my problem, I just needed to change the code to this:  
> var newMsg = { payload: msg.payload["pm1.0"] };

Which is what the methods in the linked page would have allowed you to determine.

---

<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: [8 February 2024 09:36 UTC](https://discourse.nodered.org/t/payload-address-has-a-decimal-period/84899/5 "2024-02-08T09:36:59Z")

</div>

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