Answers for "how to filter populate data in mongodb"

0

how to filter populate data in mongodb

Story.
  find(...).
  populate({
    path: 'fans',
    // filtering field, you can use mongoDB syntax
    match: { age: { $gte: 21 } },
    // Explicitly exclude `_id`, see http://bit.ly/2aEfTdB
    select: 'name -_id'
  }).
  exec();
Posted by: Guest on June-16-2020

Code answers related to "how to filter populate data in mongodb"

Code answers related to "Javascript"

Browse Popular Code Answers by Language