title: Trying to add new record if it doesnt exist in an array
body: <p>I am writing a nodejs based script to take temperature readings from a raspberry pi and having some troubles with the Sequelize part where it adds the sensor to the database.</p>
  
  <p><code>sensor.list</code> is used by the ds18x20 library to get all of the sensors connected to the raspi. I need to iterate through the results of this list function, and if the <code>sensorId</code> doesn't exist in the database, i need to add it.</p>
  
  <p>So far i have the following code, which retrieves the list of sensors, iterates over them and looks them up in the database.. </p>
  
  <pre><code>sensor.list(function(e, sensors){
    logger.debug("Sensors Found:");
    logger.debug(sensors);
    for(var i=0; i &lt; sensors.length;i++){
      db.Sensor.find({
        where: { sensorId: sensors[i] }
      }).success(function(s){
        if (!s){
          ##sensors[i] is undefined here
          logger.debug('Adding Sensor '+sensors[i]+' To the database as it doesn\'t exist!');
          db.Sensor.create({
            sensorId: sensors[i],
            name: sensors[i]
          });
        }else{
          Sensors.push(s);
        }
      });
    }
  });
  </code></pre>