title: BackboneJS .get() and .at() undefined after .fetch()
body: <p>localhost:3000</p>
  
  <pre><code>[{"idrooms":1,"roomname":"red","occupants":0},    {"idrooms":2,"roomname":"green","occupants":0},{"idrooms":3,"roomname":"blue","occupants":0},   {"idrooms":4,"roomname":"yellow","occupants":0},    {"idrooms":5,"roomname":"purple","occupants":0},{"idrooms":6,"roomname":"cyan","occupants":0}]
  </code></pre>
  
  <p>On the client side I started with the basics I know so far:
                  
                  
                  
                      
                      Title
                  
                  </p>
  
  <pre><code>            &lt;script src="jslib/jquery.js"&gt;&lt;/script&gt;
              &lt;script src="jslib/underscore.js"&gt;&lt;/script&gt;
              &lt;script src="jslib/backbone.js"&gt;&lt;/script&gt;
              &lt;script&gt;
              // Your code goes here
              var Room = Backbone.Model.extend({
                  defaults: {
                  idrooms: 0,
                  roomname: "default",
                  occupants: 0
                  }
              });
  
              var RoomList = Backbone.Collection.extend({
                  model: Room,
                  url: 'http://localhost:3000'
              });
  
              var roomlist = new RoomList();
              roomlist.fetch();
  
              console.log(roomlist);
              console.log(roomlist.at(1));
              console.log(roomlist.get(1));
              &lt;/script&gt;
              &lt;/body&gt;
              &lt;/html&gt;
  </code></pre>
  
  <p>There is all kind of data in roomlist and if I drill into it I see the attributes of all six Room model objects. roomlist.at(1) and roomlist.get(1) are returning an undefined. Perhaps I made a mistake somewhere.</p>
  
  <p>The server is short enough perhaps I should post it:</p>
  
  <pre><code>            var express = require('express')
                , cors = require('cors')
                , get = require('./routes/get')
                , http = require('http')
                , path = require('path')
                , mysql = require('mysql')
                , app = express();
  
              var connection = mysql.createConnection({ host: 'localhost', user: 'root',  
                                                        password: 'oilwell123', database: 'multiroomchat'});
  
              app.get('/', cors(), function(req, res, next){
                  if (connection) {
                      connection.query('select * from rooms', function(err, rows, fields) {
                          if (err) throw err;
                          res.contentType('application/json');
                          //res.write(JSON.stringify(rows));
                          res.send(rows);
                          res.end();
                      });
                  }
              });
  
              app.listen(3000, function(){
                console.log('CORS-enabled web server listening on port 80');
              });
  </code></pre>
  
  <p>jsonlint says its valid json...</p>
  
  <p>Thank you for posting...</p>