Skip to content

Instantly share code, notes, and snippets.

@gavinblair
Created December 6, 2010 00:29
Show Gist options
  • Save gavinblair/729639 to your computer and use it in GitHub Desktop.
Save gavinblair/729639 to your computer and use it in GitHub Desktop.
Example implementation of the city budget API using JSONP
//It involves two steps -- the ajax call and the call back function:
$.ajax({
url:'http://budget.opendatalondon.ca/api/budget/year/2010/org/803/format/jsonp',
type:'GET',
dataType:'jsonp',
success: abc
});
//the JSON is passed as a parameter to your callback function
function abc(budget){
/* replace this with your functionality */
console.log(budget);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment