title: Mongodb project $match fields in aggregation output
body: <p>I would like to project the 'VBID' field in the output. However, I do not get the desired output even though I have included the 'VBID' field in $project. Am I missing out something?</p>
  
  <pre><code>db.VehicleCount.aggregate([
      {"$match":  {   "VBID" : "SL0008",
                      "Tstmp" : {"$gte" : 1506970800000}
                  }
      },
      {"$group":  {   "_id": {"$divide" : [{ "$subtract" : [{"$divide" : ["$Tstmp", 1000]}, { "$mod" : [{"$divide" : ["$Tstmp", 1000]}, 3600] }] }, 3600 ]}, 
                      "Car": {"$sum" : {"$cond": [ { "$eq": [ "$VType", 0 ] }, 1, 0 ]}},
                      "Large vehicle": {"$sum" : {"$cond": [ { "$eq": [ "$VType", 1 ] }, 1, 0 ]}},
                      "Bike": {"$sum" : {"$cond": [ { "$eq": [ "$VType", 2 ] }, 1, 0 ]}}
                  }
      },
      {"$project" : { "_id" : 1,
                      "Timestamp" : {"$multiply": ["$_id", 3600]},
                      "VBID" : 1,
                      "Car" : 1,
                      "Large vehicle" : 1,
                      "Bike" : 1
                  }
      },
      {"$sort" :  {   "Timestamp" : 1}}
      ])
  </code></pre>
  
  <p>Thanks</p>