I am trying to replaces instances of \\r or \\n characters in my json object with for display on a website.
\\r
\\n
I tried:<
This worked for me:
str = str.replace(/\\n|\\r\\n|\\r/g, '');
Using double slash