Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //OR
- db.alura.find({
- $or:[
- {"alunos.cursos.nome":"magica"},
- {"alunos.cursos.nome":"sprite"}
- ]
- });
- //AND
- db.alura.find({
- $or:[
- {"alunos.cursos.nome":"magica"},
- {"alunos.cursos.nome":"circo"}
- ],
- "alunos.nome":"Daniela"
- });
- //IN
- db.alura.find({
- "alunos.cursos.nome":{
- $in:[
- "fanta",
- "corrida"
- ]
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement