Answer the question
In order to leave comments, you need to log in
Why is the findOne query returning the entire mongodb collection?
Hello!
How to get the object "B183", for some reason findOne returns the entire collection
My query: db.findOne({'PhysMath.Pedagogical sciences.B183.code': "B183"})
"ГеоБио": {
"Педагогические науки": {
"B001": {
"code": "B001",
"name": "Педагогика и психология",
"max": " 140",
"min": " 97",
"minWithQuota": " 91"
}
}
},
"ФизМат": {
"Педагогические науки": {
"B009": {
"code": "B009",
"name": "Подготовка учителей математики",
"max": "140",
"min": " 107",
"minWithQuota": " 95"
},
"B183": {
"code": "B183",
"name": "Агроинженерия",
"max": "140",
"min": " 50",
"minWithQuota": "none",
"quotes": []
}
}
}
Answer the question
In order to leave comments, you need to log in
This is one document from the collection, you set a condition, it found it and issued it. And you probably want to get part of the document.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question