I am trying to query in mongo using the $in . however the result i see are not in same order as i had passed them .
var objectids = [
"111",
"222"
]
db.sample.aggregate([{$match:{someFields:{ $in: objectFieldIds }}}])
How the value return will be 222, 111. How does this happen?