Hi,
I am trying to format and push an array to a Powerbi Streaming dataset using HTTP request node.
Below is my code in the function node where data arrives from LORAWAN and after this I directly connect it to HTTP node with a POST Powerbi streaming dataset URL and debug node :
var payload = msg.payload;
if (payload.deviceName == "co2")
{
msg.topic = "co2";
msg.payload = payload.object.co2;
}
return msg;
I require the output in the below array format as Powerbi requires it in this specific format. How do I format it using node-red?
[
{
"co2" : 98.6
}
]
I had previously done a similar task using PowerAutomate and I had used compose step.
My flow looks like below -
Please let me know if you need more information.
Kind regards,
Amit