python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Updating a nested array using $indexOfArray and $slice in MongoDB
Using the following documents, we are able to do what we need to do which is essentially "re-parenting" a document that stores an array of ancestors like so:
db.getCollection("myarrays&...
Tom
Votes: 0
Answers: 1
How to get a count of records in MongoDB using a Lookup as a Reference
I'm trying to build a polling system. I have a collection of choices and a collection of votes
Choices collection, showing the choices available in 'poll1'
_id:'1',
pollId:'poll1',
choice:'red'
_id:'...
Ray Purchase
Votes: 0
Answers: 1
Mongo Group By query
I have data stored in a Mongo collection that is structured like this:
{
"numberAtPending" : 3,
"numberAtInProgress" : 5,
"numberAtCancelled" : 1,
"...
R111
Votes: 0
Answers: 1
Query documents with parent and child in same collection MongoDB
So, i have a mongoDB collection with the following documents:
[
{
"_id": {
"$oid": "61e928d2f6b1431588765bd4"
},
"uniqueID": 1,
"pa...
Sahil Doshi
Votes: 0
Answers: 1