JSFiddle - React, Tailwind, and code Playground
HTML
<div id="result"></div>
JavaScript
//Get Favorites as Object "favs"
$.getJSON('http://api.justin.tv/api/user/favorites/hubschrauber.json?jsonp=?', function(favs) {
$.each(favs, function(key, value) {
//For every Object, check if user is referenced in stream and therefore online
$.getJSON('http://api.justin.tv/api/stream/list.json?channel=' + favs[key].login + '&jsonp=?', function(streams) {
$('#result').append(value.title + ' ' + key + ': ' + value.login + ' (' + streams[0].channel_count + ') Viewers<br />');
viewers = streams[0].channel_count;
});
});
});