Lets say that I have an array on Object Ids:
[ 1, 2, 3, 4, 5 ]
and I have a collection called user which contains this value:
[
{
_id: 3,
name: 'hehe'
},
{
_id: 5,
name: 'hehe1'
},
{
_id: 2,
name: 'hehe2'
},
{
_id: 1,
name: 'hehe3'
},
{
_id: 4,
name: 'hehe4'
},
{
_id: 6,
name: 'hehe5'
}
]
How do i query the array object ids to the collection "user"? which the result should be the same order as the array of Object ids, would that be possible?
Thanks in advance!