hi all.. I am using this subflow to try and fade between values..
https://flows.nodered.org/flow/4abee421817eac7335b5633f166295af
i noticed the inject node in the subflows example sends JSON as the payload with a bunch of values.. which looks like this..
msg.topic: "start"
msg.payload:
{
"initialdelay": 2,
"start": 0,
"end": 1,
"duration": 3,
"step": 0.2,
"unit": "Seconds"
}
i am wondering how to send JSON data like this out of a function node but have the "start" and "end" values change based on a variable that is in flow context ? i know how to take the data from flow context and put it in a variable in the function node.. then i can send that variable out as regular msg.payload... but how do i get the variable to become the "start" or "end" value inside the JSON string and then send the JSON out of the function node ? hope that makes sense..