title: Insert object into multidimensional array in Meteor MongoDB
body: <p>I'm learning Meteor and I am having difficult understanding the MongoDB. I have a collection called Menu that looks like this:</p>
  
  <pre>
      id:123,
      cat:'starters',
        details:{[
          item:'nachos',
          price:'3.99',
          desc:'chips & queso'
        ]}
  </pre>
  
  <p>I would like to add another item to that collection to equal:</p>
  
  <pre>
      id:123,
      cat:'starters',
      details:{[
        item:'nachos',
        price:'3.99',
        desc:'chips & queso'
      ],[
        item:'calamari',
        price:'4.99',
        desc:'fried calamari'
  ]}
  </pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>Menu.upsert({_id:'123'},{$push:{details:[{item:'calamari'},{price:'4.99'},{desc:'fried calamari'}]}});
  </code></pre>
  
  <p>I have also tried using "update" but I just get a "Cannot apply $push modifier to non-array" error for both. </p>
  
  <p><strong>UPDATE</strong>
  Thank you Sindis, you were correct and I was able get this working.</p>
  
  <p>I made a new collection called Menu2 like this. </p>
  
  <pre>
      id:54,
      cat:'starters,
      details:[{
          item:'nachos'
          price:'3.99'
        }]
  </pre>
  
  <p>Then used "update" as suggested: </p>
  
  <pre><code>Menu2.update({id:'54'},{$push:{details:{item:'calamari',price:'4.99'}}});
  </code></pre>
  
  <p>And I got this!</p>
  
  <pre>
      id:54,
      cat:'starters',
      details:[{
        item:'nachos',
        price:'3.99'
      },{
        item:'calamari',
        price:'2.99'
      }]
  </pre>