How set the output variable "{{msg.payload}}" in JS?!

Anytime you need to post a chunk of code or formatted text, put a line before and after it that contains only 3 backtics – that will keep it from escaping your quotes and such.

You can try it out by editing the last post… just open your ui_template node, select all the code inside the edit panel, and paste it between the backtic lines.

Please see this post for more information on how to effectively post here