you’re on your way �
379
xml versus json
{“totals”: [
{“location”:“Vail”, “boardsSold”:642, “bootsSold”:86, “bindingsSold”:19},
{“location”:“Santa Fe”, “boardsSold”:236, “bootsSold”:45, “bindingsSold”:32},
{“location”:“Boulder”, “boardsSold”:453, “bootsSold”:90, “bindingsSold”:16},
{“location”:“Denver”, “boardsSold”:379, “bootsSold”:94, “bindingsSold”:18}
]};
Here’s a little more JSON.
This time, the Boards ‘R’ Us
sales are broken up by city.
// Get the updated totals from the JSON response
var jsonData = eval(‘(‘ + request.responseText + ‘)’);
var totalBoards = jsonData.totals[0].boardsSold +
jsonData.totals[1].boardsSold +
jsonData.totals[2].boardsSo ...