Okay so maybe this is a dumb question, but how to read, for example, msg.topic in .js file, for ( i want to log msg.topic to console)?
Done a lot of search on this, and trying reading from some other nodes, but I am a little confused.
Okay so maybe this is a dumb question, but how to read, for example, msg.topic in .js file, for ( i want to log msg.topic to console)?
Done a lot of search on this, and trying reading from some other nodes, but I am a little confused.
but how to read, for example, msg.topic in .js file,
Could you elaborate on what you mean here ?
Well in my custom node i want to use msg.topic from input (string (ip or domain )) and save it to var address.
If you look at the lower-case.js example in the node red docs creating your first node it shows how to access msg.payload. msg.topic can be accessed in exactly the same way.
Thank you!
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.