for the table node
the suggested format is
[
{
"Name": "Kazuhito Yokoi",
"Age": "35",
"Favourite Color": "red",
"Date Of Birth": "12/09/1983"
},
{
"Name": "Oli Bob",
"Age": "12",
"Favourite Color": "cyan",
"Date Of Birth": "12/08/2017"
}
]
however,
if i want to do some condition check or while inside
like
for (var i = 0; i<ct; i++)
{
myJsondata =
{
"a": (msg.payload.data.devices[i].datastreams[0]
},
if(((msg.payload["1"].data.devices[i].datastreams[0].value.split(','))[0] == msg.payload["2"][1]["b"]))
{
"a": (msg.payload.data.devices[i].datastreams[1]
}
}
the above will fail if i put the for loop OR if condition inside the json for table
can anyone help?