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

**URL:** <https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879>\
**Category:** General\
**Created:** [7 May 2019 10:07 UTC](https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879 "2019-05-07T10:07:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike67](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mike67](https://discourse.nodered.org/u/mike67)\
**Post date:** [7 May 2019 10:07 UTC](https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879/1 "2019-05-07T10:07:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 May 2019 10:17 UTC](https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879/2 "2019-05-07T10:17:06Z")

</div>

standard javascript escape character... \ so \"

though if that is actually part of a JSON object then you can use JSON.stringify(your\_complete\_object);

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [7 May 2019 10:22 UTC](https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879/3 "2019-05-07T10:22:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mike67](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mike67](https://discourse.nodered.org/u/mike67)\
**Post date:** [7 May 2019 12:28 UTC](https://discourse.nodered.org/t/how-to-insert-a-quote-in-a-msg-payload-to-write-in-a-file/10879/4 "2019-05-07T12:28:20Z")

</div>

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