mongodb - Meteor $and with $or -


i'm trying $and , $or in meteor mongo query have following doesn't seem working

would query match documents organizationid key has value in variable user.organizationid , type key either 'converntional' or 'transition'

{     organizationid: user.organizationid,       $and:[        { $or:[            {type: 'conventional'},            {type: 'transition'}        ]}    ] };  

i can't use $not i'm pretty sure it's not supported in meteor. right package i'm using not support it.

the following query describes after uses $in operator match documents type key either 'converntional' or 'transition'. $and operator implicitly provided when specifying comma separated list of expressions. using explicit , $and operator necessary when same field or operator has specified in multiple expressions.

would query match documents organizationid key has value in variable user.organizationid , type key either 'converntional' or 'transition'

{     organizationid: user.organizationid,      type: {          $in : ['conventional', 'transition']      } } 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -