title: $filter then $project on an aggregation request mongodb
body: <p>I'm trying to query my database to get a specific element from an array, then only project a part of that array, here is the code I tried: </p>
  
  <pre><code>{ $project : {
      name: 1,
      language : 1 ,
      season: [{
        $filter: {
          input: "$seasons",
          as: "s",
          cond: { $eq: [ "$$s.number", saison ] }
        }
      }, {
        $project: {
          'episodes.number': 1
        }
      }]
    } }
  </code></pre>
  
  <p>I want to only get the season that matches the number, then project the number field only.</p>
  
  <p>Here is my schema: </p>
  
  <pre><code>{
    name: {type: String},
    seasons: [{
      number: Number,
      episodes: [{number: Number, videos: [
        {
          provider: String,
          quality: String,
          language: String,
          added: { type: Date, default: new Date(1510272000000)  }
        }
        ]}]
    }]
  }
  </code></pre>
  
  <p>My current query is generating an error: MongoError: Unrecognized expression '$project', if I do the filter without the $project after it works, but then it returns a whole array instead of what I just need. Thank you.</p>