Created
February 23, 2014 12:01
-
-
Save A/9170474 to your computer and use it in GitHub Desktop.
Get the only one embed document by id from array of subdocuments.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Room.findOne({'chat._id': messageID, 'users': req.user._id}, {'chat.$': 1}, function (err, room) { | |
console.log(room); // {chat: MessageInstance}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment