title: Add an element into an object in Javascript
body: <p>I have an array and an object collection(not an object..). 
  One looks like this:</p>
  
  <pre><code>array = new Array[1,2,3,4,5]
  </code></pre>
  
  <p>The other looks like this:</p>
  
  <pre><code>{number:1, letter:a}
  {number:2, letter:b}
  {number:3, letter:c}
  {number:5, letter:e}
  </code></pre>
  
  <p>How can I push </p>
  
  <pre><code>{number:4, letter:d} 
  </code></pre>
  
  <p>into the object?</p>
  
  <pre><code>for (var i=0, arrLen=array.length; i&lt;arrLen; ++i){
   if( obj.number != array[i]{
      obj.push(create an object) // I don't know how to create such an object
      }
  }
  </code></pre>
  
  <p>I have tried other ways, but I don't think <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf" rel="nofollow">.indexOf</a> works.</p>
  
  <pre><code>for ( var k = 0, kLen = dateList.length; k &lt; kLen; ++k){
          if(obj.date.indexOf(dateList[k]) === -1){
              obj.push() // I don't know how to push {number:4, letter:d}  in
          }
      }
  </code></pre>
  
  <p>======================</p>
  
  <p>There were a lot of confusions...
  I want the final output to be in an object collection. But first I need to find the "missing object" according to the <code>array</code></p>