title: Google Apps Script messing up JSON values
body: <p>I´m using a Google Apps Script, trying to import Bitcoin-exchange rate information to a Google Spreadsheet. I use this code:</p>
  
  <pre><code>var url = "https://btc-e.com/api/2/btc_usd/ticker";
  var response = UrlFetchApp.fetch(url);
  var json = response.getContentText();
  var lcharts_data = JSON.parse(json)
  
  function bitcoin(){
    var b = lcharts_data["ticker"]["avg"];
    return b;
  }
  </code></pre>
  
  <p>The JSON-file looks like this:</p>
  
  <pre><code>{"ticker":
    {"high":947.99902,
     "low":817.64001,
     "avg":882.819515,
     "vol":24625847.06001,
     "vol_cur":28189.09956,
     "last":930,
     "buy":930,
     "sell":929.998,
     "updated":1385575341,
     "server_time":1385575342}
    }
  }
  </code></pre>
  
  <p>Yet b returns as 22.49. What am i doing wrong?</p>