I’ve just finished the TwitchTV challenge. I found it very difficult. I have been able of finishing with help from internet.
The main difficulty has been to make work a $.getJSON method nested within another one.
As the call to the JSON object with .getJSON method is asyncronous the nested call doesn’t return anything.
I found the way with help, putting all the code within a function and setting a counter equal to the lenght of the users array, decrementing in one for each of the responses to the nested JSON calls; so only when all the responses are received is when the function makes something with the html in response to the call of the function.
I would still need some more enlightenment about JSON asyncronous and I would like to know if there are other ways more simple (e.g $.ajax method with the async property, but the documentation says ‘Cross-domain requests and dataType: “jsonp” requests do not support synchronous operations’).