A question if I want to update all documents embedded in a document, how could I do? because when you run the following command
.update({'sites':{$elemMatch:{'status':true}}},{$set:{'sites.$.status': false}},{multi:true})
only the first found embedded document is updated
documents example:
{
'_id': 1,
sites: [
{'status':true,'url':'http://google.com'},
{'status':true,'url':'https://university.mongodb.com'},
{'status':true,'url':'https://docs.mongodb.org'}
]}