Last active
December 12, 2015 09:19
-
-
Save bob-sims/4750915 to your computer and use it in GitHub Desktop.
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
// demo to parse JSON feed | |
// response to https://twitter.com/Saucerdk/status/300691053743316992 | |
// https://twitter.com/Saucerdk/status/300690859253448704 | |
var xhr = Ti.Network.createHTTPClient(); | |
xhr.open('GET','http://www.achorsens.dk/custom_api.php?format=json&type=spillere'); | |
xhr.send(); | |
xhr.onload = function(){ | |
var response = JSON.parse(xhr.responseText); | |
for (var i in response.data) { | |
Ti.API.info(response.data[i].name); | |
Ti.API.info(JSON.stringify(response.data[i])); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment