title: convert a $lookup result to an object instead of array
body: <p>I'm doing a $lookup from a _id. So the result is always 1 document. Hence, I want the result to be an object instead an array with one item.</p>
  
  <pre><code>let query = mongoose.model('Discipline').aggregate([
      {
        $match: {
          project: mongoose.Types.ObjectId(req.params.projectId)
        },
      },
      {
        $lookup: {
          from: "typecategories",
          localField: "typeCategory",
          foreignField: "_id",
          as: "typeCategory"
        }
      },
      {
        $project: {
          title: 1, typeCategory: "$typeCategory[0]"
        }
      }
    ]);
  </code></pre>
  
  <p>This notation: <code>"$typeCategory[0]"</code> is not working. Is there any smart way of doing this?</p>