MongoDB card reviewmedium

What is the $unwind stage in MongoDB aggregation?

$unwind breaks an array field into separate documents. Each element in the array becomes its own document in the aggregation pipeline. It is useful when processing array-based data.

JB

Jeevan Bhargav

Audited by Creator

This answer is calibrated for technical interviews. Verify benchmarks in local sandboxes before deploying.