On Apr 26, 5:44 pm, Scott Hernandez <
scotthernan...@gmail.com> wrote:
> As Andreas mentioned you can do this query without any $and/$or.
>
> You only need $and when you repeat field names/operations which would
> otherwise not be represented by a dictionary/map where the key can
> only exist in one place.
>
> The two forms are these.
>
> find({id:1, name:{$in:["x","y","z"]}}
> find({id:1, $or : [ {name:"x"}{name:"y"},{name:"z"}]}
>
>
>
>
>
>
>
> On Thu, Apr 26, 2012 at 8:36 AM, Marc <
m...@10gen.com> wrote:
> > There was another question regarding using '$and' and '$or' in the
> > same query asked earlier today: