title: converting a JSON string to object in javascript
body: <p>Hi I need to convert a string to a JSON object so that i can get the value from it
  below is my string</p>
  
  <blockquote>
    <p>{ "USER_NAME": "Desc", "PASSWORD": "hiiiiiii"}</p>
  </blockquote>
  
  <p>I tried the below code</p>
  
  <pre><code>var data='{ "USER_NAME": "Desc", "PASSWORD": "hiiiiiii"}'
  var output=JSON.parse(data);
  var user=output["USER_NAME"];
  console.log(user)
  </code></pre>
  
  <p>But am getting the error as below </p>
  
  <pre><code>Unexpected token u
  </code></pre>
  
  <p>I'm stuck here any help will be much helpful</p>