Issue Looping Json

I'm having an issue looping through json.

In the below code the looped urls are out of order and the id in the alert is always 3. Can someone tell me what I'm doing wrong here?

var urls = ["", "", ""];

for (var i = 0, url; url = urls[i]; i++) {

    $.getJSON('' + url + '&format=json&consumer_key=' + consumer_key, function(playlist) {
        alert(i + playlist.title);


$.each(urls,function(key,value) {

    $.getJSON('' + value + '&format=json&consumer_key=' + consumer_key, function(playlist) {
        alert(i + playlist.title);

Need Your Help

Python Tkinter scrollbar for frame

python tkinter scrollbar frame

My objective is to add a vertical scroll bar to a frame which has several labels in it. The scroll bar should automatically enabled as soon as the labels inside the frame exceed the height of the f...

Windows Metro App : How can I add stuff on my screen which is displayed only when I scroll on it?

windows scroll microsoft-metro options

I have information on my main screen (4 listviews) and it takes all the space. What I want to do is add some fields on the sides (to select options and filters) which will not be displayed by defau...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.