4
I am trying to take the JSON data from Twitch and manipulate it in html, in case I wanted to put together a simple list with the online channels, using Alert it shows the channels but I thought to print the list in a ul,li without having to touch the html. Can someone point me in the right direction?
$.ajax({
type : "GET",
dataType : "jsonp",
url : "https://api.twitch.tv/kraken/streams?limit=25&offset=25",
success: function(data){
for(i=0;i<data.streams.length;i++){
//alert(data.streams[i]._links.self);
}
}
});
http://jsfiddle.net/qo6dcyt3/1/
– Edi. Gomes
just to complement, @Juliano, if I wanted to create a condition based on a value that is in json, you would use an if?
– haykou
It depends on what you check, but if is a possibility. If it’s to take some elements out of the list depending on the condition, then I would use a filter.
– Juliano Alves