title: using $and with $match in mongodb
body: <p>I am trying to use the following query in MongoDB but it is not working.</p>
  
  <pre><code>db.test.aggregate(
  $match: {$and: [type: {$in: ["TOYS"]}, type: {$nin: ["BARBIE"]}, time: 
  {$lt:ISODate("2013-12-09T00:00:00Z")}]}})
  </code></pre>
  
  <p>It says invalid character ":".</p>
  
  <p>Is it possible to use $and with $match? I have seen an example on this forum of $or with $match so I presumed this is possible.</p>
  
  <p>Thank you in advance for your help and guidance.</p>