skip to Main Content

Value not saving in mongodb

const serverS = await server.findOne({ guildID: message.guild.id }); serverS.settings[1]["links"] = true; serverS.save() The code I use ^^^^ So when it saves the changes I check the database using MongoDB compass I don't see the change appearing in the array object…

VIEW QUESTION

MongoDB : Query documents by values in array

I have those documents : {"_id" : 1, "actors" : [{"matricule" : "AVB", "name":"XXX"}, {"matricule" : "AVB", "name":"YYY"}]} {"_id" : 2, "actors" : [{"matricule" : "PMH", "name":"FFF"}, {"matricule" : "BNG", "name":"HHH"}]} I would like to get only the first document…

VIEW QUESTION
Back To Top
Search