1

can't find in documentation of mongodb why this:

db.users.find({  
  "groups":{
    "dateFrom" : {
         "$lte" : ISODate("2016-12-31T23:00:00Z")
      }
  }
})

doesn't work but this :

    db.users.find({  
  "groups.dateFrom":{
    "$lte" : ISODate("2016-12-31T23:00:00Z")                              
   }
})

it's fine and I can get expected results.

Can someone explain why first code doesn't work ?

thanks

user2675118
  • 121
  • 1
  • 5

0 Answers0