title: Update array in mongoDB through my loopback application
body: <p>I am developing API using loopback + mongoDB. In that i have to update an array in a document in mongoDB:</p>
  
  <p>My model:</p>
  
  <pre><code>{
    "userId": "546fgdfgd445",
    "rrrr": "7",
    "bbbbb": [
      {}
    ],
    "id": "57a437789521b58b12124016"
  }
  </code></pre>
  
  <p>I need to update the array with new element with the data sent form client:</p>
  
  <pre><code>app.models.vvvvv.update({ userId: '546fgdfgd445' },{ $push: { "transactions": transactionData }}, function(err, res){
          if(err){
              console.log(err);
          } else {
              console.log(res);
          }
      });
  </code></pre>
  
  <p>But i am receiving error:</p>
  
  <pre><code>{ name: 'MongoError',
    message: 'The dollar ($) prefixed field \'$push\' in \'$push\' is not valid for storage.',
    driver: true,
    index: 0,
    code: 52,
    errmsg: 'The dollar ($) prefixed field \'$push\' in \'$push\' is not valid for storage.' }
  </code></pre>
  
  <p>I am using mongoDb version 3.2.3.</p>
  
  <p>Please share your ideas. Thanks in advance.</p>