title: Aggregation in mongoengine
body: <p>I have tried to use aggregation in mongoengine but not getting any result. Initial code :</p>
  
  <pre><code>result = Review.objects.aggregate([{'$match': {'status': 'Remind'}}])
  </code></pre>
  
  <p>but I got error as :</p>
  
  <pre><code>command SON([('aggregate', u'review'), ('pipeline', [[{'$match': {'status': 'remind'}}]]), ('cursor', {})]) on namespace db_name.$cmd failed: exception: pipeline element 0 is not an object
  </code></pre>
  
  <p>After referring various <a href="https://github.com/MongoEngine/mongoengine/issues/1252" rel="nofollow noreferrer">links</a>, I updated my code:</p>
  
  <pre><code>pipeline = [{ "$match": {'status': 'Remind' } }]
  results = list(Review.objects.aggregate(*pipeline))
  print 'result='+str(results)
  </code></pre>
  
  <p>Now, I am not getting any exception or error but result is still empty</p>
  
  <pre><code>result=[]
  </code></pre>
  
  <p>Here is my sample mongodb data:</p>
  
  <pre><code>{
      "_id" : ObjectId("599aaf826bc80b178a00ef1"),
      "timestamp" : "on Mar 19, 2017",
      "profile" : "Aditya Roy",
      "status" : "Remind",
      "created_on" : ISODate("2017-08-21T15:31:38.052Z")
  }
  {
      "_id" : ObjectId("599aaf826bc80b178a00ef2"),
      "timestamp" : "on Mar 16, 2017",
      "profile" : "Shivam Singh",
      "status" : "Remind",
      "created_on" : ISODate("2017-08-21T15:31:38.778Z")
  }
  {
      "_id" : ObjectId("599aaf836bc80b178a00ef3"),
      "timestamp" : "on Mar 13, 2017",
      "profile" : "Gautam Sharma",
      "status" : "Closed"
      "created_on" : ISODate("2017-08-21T15:31:39.526Z")
  }
  </code></pre>