Skip to content

Instantly share code, notes, and snippets.

@ezos86
Created July 28, 2013 18:49
Show Gist options
  • Save ezos86/6099637 to your computer and use it in GitHub Desktop.
Save ezos86/6099637 to your computer and use it in GitHub Desktop.
Jquery .getJSON Example
function api_get (){
var url = "https://api.qpme.com/1.6/locations";
$.getJSON(url, function(data){
var size = data.length;
for(i = 0; i < size; i++){
$('#mydiv').append(data[i].address + ' - ' + data[i].name + '<br>');
console.log(data[i]);
}
});
}
api_get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment