Please consider this as a part of my schema.
newSchema({
'product':{}
'productPayment':[{}]
});
productPayment has 'n' number of elements each with unique Ids. I want to return only that array element which matches my id. I queried like schema.findOne({'_id':variables._id,'productPayment._id':variables.productPaymentId}) but it returns whole document, but I want that particular element only. How can I possibly get that? Any help will be appreciated. Thanks in advance.