title: How do I JSON.parse a string with HTML tag?
body: <p>I have a string like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>{"Restriction":"&lt;wbr&gt;&lt;a href=\"https://www.google.com.tw/#q=%E4%B8%AD%E5%9C%8B\" 
  target=\"_blank\"&gt;&lt;span style=\"color: rgb(0, 0, 205);\"&gt;more info&lt;/span&gt;&lt;/a&gt;&lt;/wbr&gt;"}
  </code></pre>
  
  <p>but I can't parse it with JSON.parse. My code looks like this:</p>
  
  <pre><code>var s = '{"Restriction":"&lt;wbr&gt;&lt;a href=\"https://www.google.com.tw/#q=%E4%B8%AD%E5%9C%8B\" target=\"_blank\"&gt;&lt;span style=\"color: rgb(0, 0, 205);\"&gt;more info&lt;/span&gt;&lt;/a&gt;&lt;/wbr&gt;"}';
  var obj = JSON.parse(s);
  </code></pre>
  
  <p>and I got the error:</p>
  
  <blockquote>
    <p>Uncaught SyntaxError: Unexpected token.</p>
  </blockquote>
  
  <p>My guess is 「\"」 made something wrong, but I can't change the string because I got it from a call to a remote API. Here's my code:</p>
  
  <pre><code>// We need this to build our post string
  var querystring = require('querystring');
  var http = require('http');
  var fs = require('fs');
  
  function PostCode(codestring) {
  
    // An object of options to indicate where to post to
    var post_options = {
        host: 'api.domain',
        port: '80',
        path: '/webservice/service.asmx/method?key=123456',
        method: 'GET',
        headers: {
            'Content-Type': 'text/plain'
        }
    };
  
    // Set up the request
    var post_req = http.request(post_options, function(res) {
        res.setEncoding('utf8');
        res.on('data', function (chunk) {
          var x = {};
            console.log('Response down');
            x = JSON.parse(chunk);
        });
    });
  
    post_req.end();
  
  }
  PostCode();
  </code></pre>