$unwind
Last updated
What is $unwind?
The $unwind aggregation stage deconstructs array fields, creating separate documents for each array element. It's essential for processing documents with embedded arrays by flattening them into individual records. $unwind supports options for preserving null/empty arrays and including array indices, enabling detailed analysis of array-based data structures and normalization workflows.
Free resources to learn $unwind
- Official docs$unwind
- ArticleAdvanced Techniques with MongoDB: Mastering Lookup
More in stage 9: Developer Tools
$unwind: common questions
Can I learn $unwind in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain $unwind in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this $unwind tutorial for beginners?
It is lesson 83 of 106 in the free MongoDB roadmap, in stage 9, Developer Tools. If you are new to MongoDB, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.