# $unwind: One Document per Array Item

$unwind turns a document with an array into one document per item, so a pipeline can count, group and total the items themselves, such as the units of each product sold across every order.

![Cheat sheet: $unwind: One Document per Array Item](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8076e21cd9ca4971adf3daf96ae9fc4c.webp)

- Category: MongoDB
- Level: Journeyman
- Tags: $group, $unwind, Aggregation Pipeline, mongodb
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/mongodb-aggregation-unwind-cheat-sheet
