javascript remove escape characters from string code example

Example 1: js escape characters

JS Escape Characters
\' — Single quote
\" — Double quote
\\ — Backslash
\b — Backspace
\f — Form feed
\n — New line
\r — Carriage return
\t — Horizontal tabulator
WebsiteSetup.org - Beginner’s Javascript Cheat Sheet 7
\v — Vertical tabulator

Example 2: js remove escape characters from json

var x = {"name":"void", "type":"O'\"Rielly"};
document.write(JSON.stringify(x, null, ' '));

Example 3: js remove escape characters from json

var x = {"name":"void", "type":"O'\"Rielly"};
document.write(JSON.stringify(x, null, '8'));