title: How to convert JSON object to JavaScript object
body: <p>I am trying to convert JSON object data from <a href="http://api.fixer.io/latest?base=USD" rel="nofollow noreferrer">http://api.fixer.io/latest?base=USD</a> which contains to JavaScript object `</p>
  
  <pre><code>{
      "base": "USD",
      "date": "2016-12-14",
      "rates": {
          "AUD": 1.3319,
          "BGN": 1.8375,
          "BRL": 3.311,
          "CAD": 1.3116,
          "CHF": 1.0097,
          "CNY": 6.9052,
          "CZK": 25.388,
          "DKK": 6.986,
          "GBP": 0.78883,
          "HKD": 7.7566,
          "HRK": 7.0843,
          "HUF": 295.84,
          "IDR": 13288,
          "ILS": 3.8097,
          "INR": 67.479,
          "JPY": 114.98,
          "KRW": 1166,
          "MXN": 20.262,
          "MYR": 4.4441,
          "NOK": 8.4764,
          "NZD": 1.3849,
          "PHP": 49.716,
          "PLN": 4.1716,
          "RON": 4.2421,
          "RUB": 61.197,
          "SEK": 9.1651,
          "SGD": 1.424,
          "THB": 35.59,
          "TRY": 3.4879,
          "ZAR": 13.67,
          "EUR": 0.9395
      }
  }
  </code></pre>
  
  <p>What i have tried so far in console</p>
  
  <pre><code>var text = $.getJSON('http://api.fixer.io/latest?base=GBP')
  var obj = JSON.parse(text);
  </code></pre>
  
  <p>which gives me an error.</p>
  
  <pre><code>var text = $.getJSON('http://api.fixer.io/latest?base=GBP')
  var obj = JSON.stringify(text, 0, 2)
  </code></pre>
  
  <p>which turn everything to string which is not what i wanted.</p>
  
  <p>I am trying to achieve(after manage to convert them into object)</p>
  
  <pre><code>obj.rates.AUD
  </code></pre>
  
  <p>Which will return the value 1.3319 which is from the JSON object data. Thanks</p>