title: Needing to convert array of user ids to ObjectIds to use in aggregate function
body: <p>I was working on some old code using the aggregate framework.  The aggregate looks something like this:</p>
  <pre><code>User.aggregate([
    { $match: {
       _id: { $in: invitedUserObjectIds, $ne: game.createdBy._id },
      ...
    },
  ...
  ]
      
  </code></pre>
  <p>Originally the code had user ids in the form of strings like so <code>['qwertyuiop',...]</code>.  It was working.</p>
  <p>Now in order to get it to work properly I have to convert each string id into an ObjectId before passing the new ObjectId array to the <code>$match</code> aggregate pipeline stage.</p>
  <p>Not a big deal but trying to understand why this is or if I am missing something simple?  I've tested the exact same query with only <code>invitedUserObjectIds</code> changing to either array of string ids or array of object ids.</p>