How to insert a quote in a msg.payload to write in a file

Hello
I want to write this characters in a file
"description": "Default Welcome Intent",
The problem is that I can not insert correctly the " in the msg.payload that I want to write to my file.

what is the syntax to be able to include a " in a msg.payload?
Thanks

1 Like

standard javascript escape character... \ so \"

though if that is actually part of a JSON object then you can use JSON.stringify(your_complete_object);

Also if you use single quotes to delimit a string then you can use double quotes directly inside, so
msg.payload = ' "text" '

1 Like

Thanks a lot, ' "text" ' works fine.