mongoose-dive-populate
A mongoose plugin to populate into nested documents in depth by a easy reading path. The path can be specified by a url like: "parent/children"
Can also select fields of population like: "parent{name age}/children{name toy}"
Can limit the number of subdocuments in population "parent{name age}/children[5]{name}"
Usage
Register plugin
const divePopulate =mongoose
or:
YourSchema
population Example:
const Club = mongoose const Player = mongoose const Fan = mongoose Club // Can select fieldsClub // Can use with normal populate together Club // Can select fieldsClub // Can exclude fieldsClub