title: Replace single backslash escape with double backslash in JavaScript
body: <p>I'm using json result from the Bing Search API. In the result, the double quotes is escaped by a single backslash. Javascript however, doesn't accept this. It requires me to escape the double quotes using double backslash. 
  So, my question is that how do I replace the single backslash with the double backslash.
  For example, a part of the json code is like this</p>
  
  <pre><code>"Description":"LONDON Britain should stay in the EU \"warts and all\", the opposition Labour leader will say on Thursday..."
  </code></pre>
  
  <p>I would like it be like this</p>
  
  <pre><code>"Description":"LONDON Britain should stay in the EU \\"warts and all\\", the opposition Labour leader will say on Thursday..."
  </code></pre>
  
  <p>I tried the following solution</p>
  
  <pre><code>json = '"Description":"LONDON Britain should stay in the EU \"warts and all\", the opposition Labour leader will say on Thursday..."';
  dfe = JSON.stringify(json);
  dfe = dfe.replace(/\\"/g,'\\\\"');
  </code></pre>
  
  <p>However, it didn't work. It replaced all the backslashes before all double quotes. It went from this...</p>
  
  <pre><code>\"Description\":\"LONDON Britain should stay in the EU \"warts and all\", the opposition Labour leader will say on Thursday...\"
  </code></pre>
  
  <p>...to this </p>
  
  <pre><code>\\"Description\\":\\"LONDON Britain should stay in the EU \\"warts and all\\", the opposition Labour leader will say on Thursday...\\"
  </code></pre>
  
  <p>Can anybody tell me how to replace \" with \\" ?</p>
  
  <p>Edit: What I want to do is this</p>
  
  <pre><code>&lt;p id="demo"&gt;&lt;/p&gt;
  var json = '{"d":{"results":[{"__metadata":{"uri":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query=\u0027britain\u0027&amp;$skip=1&amp;$top=1","type":"NewsResult"},"ID":"f1c27ae7-bf16-4741-a789-897f4878c2e1","Title":"Britain should stay in EU \u0027warts and all\u0027 - Corbyn | Reuters","Url":"http://www.firstpost.com/world/britain-should-stay-in-eu-warts-and-all-corbyn-reuters-2728514.html","Source":"Firstpost","Description":"LONDON Britain should stay in the EU \"warts and all\", the opposition Labour leader will say on Thursday, making his first big intervention in the referendum campaign as he seeks to counter criticism he is not doing enough to persuade his voters to back the ...","Date":"2016-04-14T05:10:45Z"}],"__next":"https://api.datamarket.azure.com/Data.ashx/Bing/Search/v1/News?Query=\u0027britain\u0027&amp;$skip=10&amp;$top=10"}}';
  
  obj = JSON.parse(json);
  document.getElementById("demo").innerHTML = obj.d.results[0].Title;
  </code></pre>