Consider the following document in mongoDB:
{words:['a','b','c','d','e','f']}
I know it's easy to get a single element or a range in mongodb using $arrayElemAt or $slice.
But how can I get multiple elements by giving a list of indices?
For example, if I have a list of indices:
[0,2,5]
the expected result is:
{words:['a','c','f']}