Hi, let's consider to have 8 messages to output from a function, they are all initally set with payload:false
Now I want that one of 8, depending on the msg.topic input is turning to null, how to?
If msg.topic is an integer, use a single message which has an array:
let myarray = [false, false, false, false ...]
myarray[msg.topic] = null
msg.payload = myarray
return msg
Or if it's a string, an object
let myobject = {"topic1": false, "topic2": false, ... }
myobject[msg.topic] = null
msg.payload = myobject
return msg