Hello,
Im struggeling for 3 - 4 days how I can tell this in a aggregate or a find
- genres does not contain “Crime” or “Horror”
- rated is either “PG” or “G”
It seems I cannot use two times a $or because the second time overwrites the first one.
But how can I make this work ?
that does not work both a a string so I thought of using $ ne
But still how can I make a query where I have to use two times a $or
steevej
(Steeve Juneau)
4
A JSON document cannot have the same key twice.
An array can be used to $and or $or multiple clauses.
I do not understand the following:
But
{ rated : { $in : [ "P", "PG" ] } }
works fine even if rated is a string.
And since this thread is related to M121 at MongoDB University, it is best to have this thread over there in the course specific forum.
1 Like
Takis
(Takis )
5