# Problems to get payload data to debug

**URL:** <https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038>\
**Category:** General\
**Created:** [4 May 2020 00:35 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038 "2020-05-04T00:35:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Circuits](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Circuits](https://discourse.nodered.org/u/Circuits)\
**Post date:** [4 May 2020 00:35 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038/1 "2020-05-04T00:35:14Z")

</div>

Hello greetings,

Sorry this is my first contact with the nodered platform and I have been having this problem for three days, I already searched and did not find the information to solve this problem, I have already read various topics and tutorials and I could not understand the problem I am experiencing .  
I've read this tutorial several times and I can't understand what is wrong. [https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)  
I am trying to show only the information from the T4ACC topic in the debug node, but I am not getting it.  
I made a simple flow to understand but I am not able to solve the problem.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/1/4125a930d3977585382293e23f4a0d221bc438d5.png)  
I tried to use this syntax for the debug node and am getting error messages  
msg.payload."T4ACC"  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/4/04c2ca41561cb413528865acd709e8c967e6014a.png)  
Please how would be the correct syntax for this debug node?  
My nodered flux:

[  
{  
"id": "6bc670f.5dd2b9",  
"type": "tab",  
"label": "Flow 1",  
"disabled": false,  
"info": ""  
},  
{  
"id": "6b864fdd.66bf88",  
"type": "pccc in",  
"z": "6bc670f.5dd2b9",  
"endpoint": "db7c09e4.fdcf7",  
"mode": "all-split",  
"variable": "N7.0",  
"diff": false,  
"name": "PLC",  
"x": 130,  
"y": 240,  
"wires": [  
[  
"a156d74e.5690a"  
]  
]  
},  
{  
"id": "a156d74e.5690a",  
"type": "debug",  
"z": "6bc670f.5dd2b9",  
"name": "",  
"active": false,  
"tosidebar": true,  
"console": false,  
"tostatus": false,  
"complete": "payload."T4ACC"",  
"targetType": "msg",  
"x": 460,  
"y": 240,  
"wires":   
},  
{  
"id": "db7c09e4.fdcf7",  
"type": "pccc endpoint",  
"z": "",  
"address": "192.168.0.197",  
"port": "44818",  
"userouting": false,  
"routing": "0x01,0x00,0x01,0x00",  
"cycletime": "500",  
"timeout": "1500",  
"name": "ML1100",  
"vartable": [  
{  
"addr": "T4:0.ACC",  
"name": "T4ACC"  
},  
{  
"addr": "T4:1.ACC",  
"name": "T41ACC"  
}  
]  
}  
]

Thank you for your 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:** [4 May 2020 00:45 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038/2 "2020-05-04T00:45:48Z")

</div>

> [@Circuits](#):
>
> I am trying to show only the information from the T4ACC topic in the debug node

Why? Its just a debug node for viewing what's in a message. Why would you spend days trying to achieve something your first picture shows you achieved anyway?

I don't understand.

> [@Circuits](#):
>
> msg.payload."T4ACC"

This is not valid JavaScript.

Just put msg.payload in the debug setting.

Ps, please wrap code with backticks like this...

`````  
`code here`  
`````

To access the value of `topic` in a change or switch node, just enter **topic**

To access the value of `payload` in a change or switch node, just enter **payload**

To access these in a function node, use `msg.topic` or `msg.payload`

---

<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:** [4 May 2020 08:06 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038/3 "2020-05-04T08:06:13Z")

</div>

If you just want to see items with a topic of T4ACC then use a switch node set to

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/5/c516c23e8a4e4839da2dee885448f9f384d3ec33.png)  
inserted before the debug node.

---

<div class="post-metadata">

**Author:** ![Circuits](https://avatars.discourse-cdn.com/v4/letter/c/9de0a6/32.png) [@Circuits](https://discourse.nodered.org/u/Circuits)\
**Post date:** [4 May 2020 11:24 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038/4 "2020-05-04T11:24:01Z")

</div>

Hi dceejay,

Thanks for the help it worked perfectly, I was using the debug node to test and verify the data I wanted to see, if it showed the correct value because I wanted to send it to the dashboard gauge node.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/2/f208e1ba86dfd5c7c2d897160695ef68de3e5b4d.png)

thank you  
best regards

---

<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:** [18 May 2020 11:24 UTC](https://discourse.nodered.org/t/problems-to-get-payload-data-to-debug/26038/5 "2020-05-18T11:24:03Z")

</div>

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