title: how to convert the string into json object?
body: <p>I use the ajax which sends back a string..</p>
  
  <p>I want to convert the responsetext into a json object to process.</p>
  
  <p>I tried eval and also , but doesn't works...</p>
  
  <p>Wht to do?</p>
  
  <p>My code is </p>
  
  <pre><code>function handleResponse() {
    if (httpa.readyState == 4) {
      var response = httpa.responseText;
      if (response != 'empty') {
        alert(response);
        var foo = eval('(' + strJSON + ')');
        alert(foo);
      }
    }
  }
  </code></pre>
  
  <p>// response alerts  </p>
  
  <pre><code>[{
    "id": "1",
    "name": "Pepsodent 100g",
    "selling_price": "28.75"
  }, {
    "id": "2",
    "name": "Pepsodent 40g",
    "selling_price": "18.90"
  }, {
    "id": "3",
    "name": "Pepsodent brush",
    "selling_price": "19.50"
  }]
  </code></pre>