Msg.payload for vertical table

Hello there!
Need you help.

I am receiving data and has date using function. below Is what I have written in function node to pass those value in table node. that is giving me horizontal table.

msg.payload = [
    {
        "Date": printdate,  
        "Time": printtime,
        "Machine_ID": MachineID,
        "Customer_ID":CustomerID,
        "Customer_Name":CustomerName,
        "Date_of_Instolation":Instolationdate
    },
  ];

Screenshot (79)

But I want to display it in vertical table.
What should I write for that?
Screenshot (81)

2 options.

  1. Change your database query to return that shape of data (fastest)
    OR
  2. Modify your function to change the shape of the data (slowest)

For item 2, this should work...

msg.payload = Object.entries(msg.payload[0])
return msg

1 Like

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