title: How to read json response from node js server?
body: <p>I have a NodeJS REST API. In that API, I have to call another 3rd party API to get some data. It gives us data as JSON. This is how I set that response of data to my REST url response.</p>
  
  <pre><code>request('http://dev.demo.com/api/v1/wow/getFreeviewLoginAndCallAPI/123', function (error, response, body) {
  if (!error &amp;&amp; response.statusCode == 200) {
      console.log(body);
      res.json(body);
  }
  </code></pre>
  
  <p>});</p>
  
  <p>And then I get a response like this. </p>
  
  <pre><code>"{\"Response\":{\"@attributes\":{\"Package\":\"MONTHLY\",\"Surname\":\"Taylor\",\"CSN\":\"104801\",\"Email\":\"adam.taylor@gmail.com\",\"MiscInformation\":\"\",\"Message\":\"CUSTOMER_ACTIVE\"}},\"Submission\":{\"@attributes\":{\"SubmitterRef\":\"0778798654\",\"Submitter\":\"demoName\"}}}"
  </code></pre>
  
  <p>But when I use that 3rd party URL in my browser , I get a clean and nice JSON output. Like the following. </p>
  
  <p>(without \ symbol)</p>
  
  <p>No other "\" symbols and it's clean. What I need to do is I need to access some values of this response. In the node js. I need to send the response as follows. </p>
  
  <blockquote>
    <p>res.json(body.Response);</p>
  </blockquote>
  
  <p>But it's null. And also I need to take all these values to variables. How can I do that ?</p>