Answers for "how to use id in aggregate"

0

how to use id in aggregate

const ObjectId = mongoose.Types.ObjectId;
const User = mongoose.model('User')

User.aggregate([
  {
    $match: { _id: ObjectId('560c24b853b558856ef193a3') }
  }
])
Posted by: Guest on November-02-2020

Code answers related to "how to use id in aggregate"

Browse Popular Code Answers by Language