Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
How to loop through an array and parse with $.getJSON? (if possible)
Hi, I have a link to my codepen I've been working in: http://codepen.io/xGabey/pen/BpBVZw?editors=0010 and as you can see, I have an array called 'streamers' with 3 streamers inside. Then, I have a variable 'proxy' which stores a sort of API in it for Twitch. (I heard it was a proxy so people wouldn't have to use the old API.) So my problem is, inside proxy, the very last item stores a channel name. But currently, the channel name I put in it is the second, streamers, in the array. I've been trying to get it so that the last item in the getJSON request, instead of being one strict channel, cycles through all items in my array and loops through and prints out each one accordingly, online/offline. The twitch dev blog was very confusing to me, as it seems they've updated their api structure multiple times, where now, a client id is not needed if using gomix.me. Super long question, but thanks to anyone in advance! G