i am using alex bilbie library for mongo db (https://github.com/alexbilbie/codeigniter-mongodb-library/tree/v2). I dont know how to form elemMatch query with this lib.
I need to transform this to alexs lib.
db.centers.find(
{
'_id': ObjectId('516d3ae30074d35600000001')
},
{
'locations' : {
'$elemMatch' : { "id" : ObjectId("51b595eabe55b59630000000") }
}
}
)