db.getCollection('User').find({
"userId" : ObjectId("5a141ac4048378xb52c3e5a9"),
"userRole" : "ADMIN",
"Id" : "1234567890"})
result:
{
"userId" : ObjectId("5a141ac4048378xb52c3e5a9"),
"userRole" : "ADMIN",
"Id" : "1234567890"
}
Expecting output:
{
"userId" : "5a141ac4048378xb52c3e5a9",
"userRole" : "ADMIN",
"Id" : "1234567890"
}
I am very new to mongodb i nedded to return objectId as String ,i neeed some suggestion to do that.