# Sparkplug b messages wont show through the subscriber payload

**URL:** <https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857>\
**Category:** General\
**Created:** [19 May 2022 17:52 UTC](https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857 "2022-05-19T17:52:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sn19](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sn19](https://discourse.nodered.org/u/sn19)\
**Post date:** [19 May 2022 17:52 UTC](https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857/1 "2022-05-19T17:52:05Z")

</div>

1. I am using the sparkplug B nodes in the node red.
2. One publisher and one subscriber.
3. The message payload is in .json format and is :  
{  
"timestamp": 14866144502122,  
"metrics": [  
{  
"name": "My metric",  
"alias": 1,  
"timestamp": 1479123452194,  
"dataType": "String",  
"isHistorical": false,  
"value": "Test"  
}  
],  
"seq": 2  
}
4. When i tried to check the message via a subscriber and payload, it says the following in the debug window :  
"TypeError: Cannot read properties of undefined (reading 'toUpperCase')"
5. The same case when tried with mqtt in and out blocks gives me the following output 🙂  
object

timestamp: 14866144502122

metrics: array[1]

0: object

name: "My metric"

alias: 1

timestamp: 1479123452194

dataType: "String"

isHistorical: false

value: "Test"

seq: 2

Please help me with this.

---

<div class="post-metadata">

**Author:** ![Thomassorensen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thomassorensen/32/45692_2.png) [@Thomassorensen](https://discourse.nodered.org/u/Thomassorensen)\
**Post date:** [20 May 2022 14:16 UTC](https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857/2 "2022-05-20T14:16:12Z")

</div>

Try renaming dataType to type…

---

<div class="post-metadata">

**Author:** ![sn19](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@sn19](https://discourse.nodered.org/u/sn19)\
**Post date:** [20 May 2022 16:27 UTC](https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857/3 "2022-05-20T16:27:26Z")

</div>

Thank you very much

---

<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:** [19 July 2022 16:27 UTC](https://discourse.nodered.org/t/sparkplug-b-messages-wont-show-through-the-subscriber-payload/62857/4 "2022-07-19T16:27:53Z")

</div>

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