title: convert a string to json object javascript
body: <p>I know that json.stringify() function converts a json object to json string. </p>
  
  <pre><code>json.stringify({x:9})
  </code></pre>
  
  <p>this will return string <code>"{"x" : 9}"</code></p>
  
  <p>But is there a way to convert a simple string into json format?
  For example i want this</p>
  
  <pre><code>var str = '{x: 9}'
  json.stringify(str)  //"{"x" : 9}"
  </code></pre>