Skip to content

Instantly share code, notes, and snippets.

@deedubs
Last active December 31, 2015 16:49
Show Gist options
  • Save deedubs/8016121 to your computer and use it in GitHub Desktop.
Save deedubs/8016121 to your computer and use it in GitHub Desktop.
Example of populate query
Story
.find(...)
.populate({
path: 'fans',
match: { age: { $gte: 21 }},
select: 'name -_id',
options: { limit: 5 }
})
.exec()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment