diff --git a/Practical/Practical Exam/MongoDB/M2 - Crud operations.md b/Practical/Practical Exam/MongoDB/M2 - Crud operations.md index b01a330..b8aa7f9 100644 --- a/Practical/Practical Exam/MongoDB/M2 - Crud operations.md +++ b/Practical/Practical Exam/MongoDB/M2 - Crud operations.md @@ -118,9 +118,11 @@ db.Employee.updateOne( 3. Selects all documents in the collection where the field age has a value less than 30 or the value of the salary field is greater than 40000. ```json db.Employee.find( - { - Age: { $lt: 30 }, - Salary: { $gt: 40000 } + { $or: + [ + { Age: { $lt: 30 } }, + { Salary: { $gt: 40000 } } + ] } ) @@ -155,3 +157,4 @@ db.Employee.find( ``` --- +