Like you know {$in: {_id: []}}
doesn't keep order.
I want to use Async.js for this purposes.
For example
const ids = [3,1,2]; // Initial ids, I get it from aggregation
const documents = [{_id:1}, {_id:2}, {_id: 3}]; // That's I get from MongoDB
const result = [{_id:3}, {_id: 1}, {_id: 2}] // That's I need
How can I perform this with Async.js? I'm using mongoose.js
with mongoose-fill which don't work with aggregation