Hey there! I have a little coding challenge for you. The current code below is only fetching the first channel from the JSON. My goal is to fetch all the streams and display them in a grid format with three streams per row. Can you help me achieve this? (Bonus question: How can I format all the fetched streams into a nice row-per-row grid which features three streams in each row)
<script>
var twitchApi = "https://api.twitch.tv/kraken/streams";
$.getJSON(twitchApi, function (json) {
var streamGame = json.streams[0].game;
var streamThumb = json.streams[0].preview;
var streamVideo = json.streams[0].name;
$('#twitch').append('<li><iframe src="http://player.twitch.tv/?channel=' + streamVideo + '"></iframe></li>');
}
);
</script>
On top of that, I need assistance with creating a script that fetches the top 10 games from a JSON. Check out the link here: . The process should be similar to the one above, but I'm hitting a mental block and could use your expertise to get this done.