Introduction to MongoDb with .NET part 8: searching in arrays and nested documents
April 7, 2016 Leave a comment
Introduction
In the previous post we went through 4 logical operators in MongoDb: $or, $and, $not and $nor. We saw a couple examples of their usage. The syntax for $or, $and and $nor are similar in that we have to provide an array of filters that are linked with the operator whereas the syntax for $not is simpler. You’ll probably not use the $and operator too often as AND conditions can be simplified by chaining together the filters by a comma.
In this post we’ll see how to query arrays and embedded documents.