I have a document:
{
_id : 123412341234
regions : {
america : [north, south, central]
europe : [east, west]
asia : [north, south, east, west, central]
}
}
I want to return the 2nd object (europe) in the regions object of the document by specifying its index.
Example:
db.area.find({}, {regions.2 : 1})
Return:
[east, west]
How do I return the 2nd object (europe) of my regions object?