MongoDB - Project only the matching element in an array
问题 How could I get one element from array from Mongo document with following structure: { array : [ {type: 'cat', name: 'George'} {type: 'cat', name: 'Mary'} {type: 'dog', name: 'Steve'} {type: 'dog', name: 'Anna'} ] } For example I need to get Steve, in this case result must looks so: { array : [ {type: 'dog', name: 'Steve'} ] } or so: {type: 'dog', name: 'Steve'} I know how make it while publishing but I need to make it on client side where whole array is available, I could return this value