Hello I want to store a javascript object in the flow context scope to keep a state over different runs of a flow
Example:
{
"lastState": {
"device1": timestamp,
"device2": timestamp,
}
}
Something like this does not work (non wokring code):
var lastReset = flow.get("lastReset")
var device = msg.device
lastReset[device] = Date.now()
flow.set(lastReset)
return msg
flow.set expects a string?
Is this possible with a function node?