1. db.students.update(  
  2.    { _id: 1 },  
  3.    {  
  4.      $push: {  
  5.        quizzes: {  
  6.          $each: [ { id: 3, score: 8 }, { id: 4, score: 7 }, { id: 5, score: 6 } ],  
  7.          $sort: { score: 1 }  
  8.        }  
  9.      }  
  10.    }  
  11. )  
 posted on 2017-12-04 23:53  jayruan  阅读(413)  评论(0编辑  收藏  举报