1. 只显示前两条数据
db.emps.aggregate([
{"$project":{"_id":0, "name":1, "salary":1, "job":1}},
{"$limit":2}
])
2.跳过1条然后只显示2条数据
db.emps.aggregate([
{"$project":{"_id":0, "name":1, "salary":1, "job":1}},
{"$skip":1},
{"$limit":2}
])
  1. $out