mongodb array push query code example
Example 1: mongodb push to arry in update
db.collection.update({_id:xx}, {$push:{letters : {$each:['first one'], $position:0}}})
Example 2: insert item into list mongodb
db.col.update(
{ name: 'doc', 'list.id': 2 },
{$push: {'list.$.items': {id: 5, name: 'item5'}}}
)