Template
single collection
multiple collections
mgodatagen
update
indexe
explain
Stage
Database
bson
mgodatagen
[{words:["a","b","c","d","e","f"]}]
Query
db.collection.aggregate([{$project:{words:{$map:{input:[0,2,5],as:"index",in:{$arrayElemAt:["$words","$$index"]}}}}}])
Result