Escape a string with JSON.stringify
Escape a string with JSON.stringify - JSON.stringify('"a"'); // "'\"a\"'"
Written by Todd Wolfson
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#