Beginner questions on IF expressions and wildcard usage in function node

The key is in element so you can use
matchingKeys.forEach((element) => node.send({topic: element, payload: msg.payload[element]}))

1 Like