{
A: "number",
B: [{C: "number"}, etc,]
}
The above is the schema of my documents.
How to write an aggregation pipeline to find all documents where:
- A > 100
- And then filters the subdocuments of B to return only the one where
C
is the maximum.