title: MongoDB: Unknown operator: $or
body: <p>I'm trying to do a simple or query for mongoDB, but I do get the error <strong>MongoError: unknown operator: $or</strong></p>
  
  <p>Could someone explain what I am doing wrong?</p>
  
  <pre><code>const query = {
    title: { $exists: true },
    category: { $exists: true, $ne: [] }
  }
  
  // ...do some stuff
  // now need to change category query...
  
  query.category = {
    $or: [
      { $exists: false },
      { $eq: [] }
    ]
  }
  
  // should return documents with missing category field or empty array value
  Content.find(query)
  </code></pre>