Concept Flow - Array expressions ($size, $arrayElemAt, $filter)
Start with input array
Apply $size
→Count elements
Apply $arrayElemAt
→Get element at index
Apply $filter
→Check each element with condition
Collect elements passing condition
→Return filtered array
This flow shows how MongoDB array expressions work: $size counts elements, $arrayElemAt picks one element by index, and $filter selects elements matching a condition.