I have the following document
db.c.save({a:[{u:3},{u:6},{u:123}]});
I want to fetch matching elements from the array. So I use the following query to do it.
db.c.find({'a.u':{$in:[3,123]}},{'a.$':1});
This gives me { "a" : [ { "u" : 3 } ] } but I guess it should return { "a" : [ { "u" : 3 }, { "u" : 123 } ] }
Any suggestions?