Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I already tried with $(document).ready and I get the same behavior. I doupt the "for loop" will change anything as I execute the script in the browser, it works perfectly with the each loop. I can see the data from the rest request in the console.