title: Redis: Saving a Javascript Object with List
body: <p>Basically I'm trying to set an object with a given value but I cannot get it to work even though it seems successful. Here is my javascript object; </p>
  
  <pre><code>function student(){
    var newStudent = {};
    newStudent.lessons = [1,3,4];
  
    return newStudent;
  }
  </code></pre>
  
  <p>Later on when I want to obtain the students list I fail as console.log prints <b>"undefined"</b> however the object is <b>not null</b>. My code for insertion to redis;</p>
  
  <pre><code>var student = Students.student();
  //Object is not null I checked it
  client.set("studentKey1", student, redis.print);
      client.get("studentKey1", function(err, reply){
          console.log(reply.lessons);
      });
  </code></pre>
  
  <p><p>Two questions; </p><p>First, how can I do it properly or is the list structure of Javascript not supported in Redis. Second, if I want to get the item with studentKey1 and insert an item to the back of list how can I accomplist that (how can I utilize <b>RPUSH</b>)?</p></p>