title: Javascript convert object in string to object literal
body: <p>I'm parsing an API in NodeJS that returns this data, as a string:</p>
  
  <pre><code>{
      "query": {
          "count": 1,
          "created": "2013-12-09T08:05:21Z",
          "lang": "en-US",
          "results": {
              "rate": {
                  "id": "GBPEUR",
                  "Name": "GBP to EUR",
                  "Rate": "1.1938",
                  "Date": "12/9/2013",
                  "Time": "3:05am",
                  "Ask": "1.194",
                  "Bid": "1.1936"
              }
          }
      }
  </code></pre>
  
  <p>}</p>
  
  <p>I'd like to convert this into a javascript Object so that I can parse it like <code>var rate = obj.query.results.rate.Rate</code>.</p>
  
  <p>I've tried using Node's <a href="http://nodejs.org/api/querystring.html" rel="nofollow">QueryString</a> Parse() but this doesn't work as expected, and <code>eval()</code> doesn't work either. How can I achieve this (obviously preferably without using <code>eval()</code>)?</p>