Created
July 28, 2013 18:49
-
-
Save ezos86/6099637 to your computer and use it in GitHub Desktop.
Jquery .getJSON Example
This file contains 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
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