title: console.log not showing expected object properties
body: <p>I have the following code in javascript in my node.js application.
  However certain objects are not stored in my variable <code>appointment</code>. Even if I set them, when I directly access them it works: <code>console.log(appointment.test);</code></p>
  
  <p>What have I done wrong in this code?</p>
  
  <pre><code>var appointment = {
      subscribed: false,
      enoughAssis: false,
      studentSlotsOpen: false
  };
  console.log(appointment);
  for (var key in appointmentsDB[i]) {
      appointment[key] = appointmentsDB[i][key];    
  }
  
  appointment.test= "res";
  
  console.log(appointment.test);
  console.log(appointment);
  </code></pre>
  
  <p>And here is the produced output:</p>
  
  <pre><code>{ subscribed: false,
    enoughAssis: false,
    studentSlotsOpen: false }
  res
  { comment: 'fsadsf',
    room: 'dqfa',
    reqAssi: 3,
    maxStud: 20,
    timeSlot: 8,
    week: 31,
    year: 2013,
    day: 3,
    _id: 51f957e1200cb0803f000001,
    students: [],
    assis: [] }
  </code></pre>
  
  <p>The variable <code>console.log(appointmentsDB[i])</code> looks as:</p>
  
  <pre><code>{ comment: 'fsadsf',
    room: 'dqfa',
    reqAssi: 3,
    maxStud: 20,
    timeSlot: 8,
    week: 31,
    year: 2013,
    day: 3,
    _id: 51f957e1200cb0803f000001,
    students: [],
    assis: [] }
  </code></pre>
  
  <p>The following command:</p>
  
  <pre><code>console.log(Object.getOwnPropertyNames(appointmentsDB[i]), Object.getOwnPropertyNames(Object.getPrototypeOf(appointmentsDB[i])));
  </code></pre>
  
  <p>Shows:</p>
  
  <pre><code>[ '_activePaths',
    '_events',
    'errors',
    '_maxListeners',
    '_selected',
    '_saveError',
    '_posts',
    'save',
    '_pres',
    '_validationError',
    '_strictMode',
    'isNew',
    '_doc',
    '_shardval' ] [ 'assis',
    'timeSlot',
    'db',
    '_schema',
    'id',
    'base',
    'day',
    'collection',
    'reqAssi',
    'constructor',
    'comment',
    'year',
    'room',
    'students',
    'week',
    '_id',
    'maxStud' ]
  </code></pre>
  
  <p>However I would expect that my last output also provides the entries test, subscribed, enoughAssis and studentSlotsOpen. What is wrong in this code?</p>
  
  <p>The solution I found was to manually copy the elements I wanted to.</p>