Created
December 6, 2010 00:29
-
-
Save gavinblair/729639 to your computer and use it in GitHub Desktop.
Example implementation of the city budget API using JSONP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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