Sparkplug b messages wont show through the subscriber payload

  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 :slight_smile:
    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.

Try renaming dataType to type…

1 Like

Thank you very much