skip to Main Content

enter image description here

success: true
datatype: "string"
timestamp: 09140820
registerId:123"
value: "{"Relay Abc":"Off","Relay Bedf":"On","MP  R31":0,"NM  R2":-1,"SP  R3":-1,"Current":0,"Voltage":0,"Voltage2":51}"
deviceID: "5A6B3038-8FA0-43F8-A54B-BCE52902337C"
tagName: "k_Test_02"
deviceName: "abc_SERVER"
   

image is the javascript code for the function node

I want same output as shown just value data to be in columns rather than in rows

2

Answers


  1. Try this, it will work I think.

    JSON.parse(string)
    
    Login or Signup to reply.
  2. If you just want the content of the input msg.payload.value

    Then you should remove the function node and replace it with a change node that will.

    move msg.payload.value to msg.payload

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search