Metode Temukan Operan Mongoose

const docs = await Character.find({
  $and: [
    {
      $or: [
        { age: { $gte: 29 } },
        { rank: 'Commander' }
      ]
    },
    {
      $or: [
        { name: { $lte: 'D' } },
        { name: { $gte: 'W' } }
      ]
    }
  ]
});

// ['William Riker']
docs.map(doc => doc.name).sort();
Scary Sardine