title: Group by Multiple Fields In Meteor
body: <p>What I am trying to achieve is, within a given date range, I want to group Users by First <code>time</code> and then by <code>userId</code>.</p>
  
  <p>I tried below query to group by Multiple Fields, </p>
  
  <pre><code>ReactiveAggregate(this, Questionaire,
  [
      {
          "$match": {
              "time": {$gte: fromDate, $lte: toDate},
              "userId": {'$regex' : regex}
          }
      },
      {
          $group : {
              "_id": {
                  "userId": "$userId",
                  "date": { $dateToString: { format: "%Y-%m-%d", date: "$time" } }
              },
              "total": { "$sum": 1 }
             }
      }
  ], { clientCollection: "Questionaire" }
  );
  </code></pre>
  
  <p>But When I execute it on server side, it shows me below error,</p>
  
  <pre><code>Exception from sub Questionaire id kndfrx9EuZ5EejKmE 
  Error: Meteor does not currently support objects other than ObjectID as ids
  </code></pre>