title: Keep the order of list node.js
body: <p>I am looping through an object (I have also tried it with an array) and building a list of urls. I have tried to enumerate using for...in and to iterate using for but I keep losing the order.</p>
  
  <pre><code> var Model = require('./model');
          var Scraper = require('./scraper');
          var Pages = [];
          function generateUrls(limit) {
            var url = 'http://www.weatheronline.co.uk/SouthAfrica/';
            var urls = [];
  
            Cities = {
      'Windhoek'  : 'Windhoek',
      'GraaffReinet' : 'GraaffReinet',
      'Queenstown'  : 'Queenstown',
      'Bhisho'  : 'Bhisho',
  };
      };
  
        for (City in Cities) {
          urls.push(url + Cities[City]);
        }
        return urls;
      }
      // store all urls in a global variable  
      Pages = generateUrls();
      function wizard() {
        // if the Pages array is empty, we are Done!!
        if (!Pages.length) {
          return console.log('Done!!!!');
        }
  </code></pre>
  
  <p>How can I keep the order. After I scrape some of the weather data I display a table of the data on a localhost. I use node.js with mongo, express and jade.</p>
  
  <p>Here is the jade code to create the table.</p>
  
  <pre><code>doctype html
  html
    body
      table(style='width:100%')
        tr
          th City
          th Min
          th Max Day 1
          th Max Day 2
          th Max Day 3
  
        each city, i in Listings
         tr
          td 
           span= city.city
          td 
           span= city.min
          td 
           span= city.max
          td 
           span= city.maxday2
          td 
           span= city.maxday3
  </code></pre>
  
  <p>Thank you              </p>