Pipeline Practice

Open every line item

`$unwind` emits one document per array element. Stages after it can treat the selected element as an ordinary nested object.

Create one row per line item with `orderId`, `productId`, `qty`, and `unitPrice`.

Expected result: 24 flattened line-item documents.

Example pipeline syntax

[
  { $unwind: "$items" }
]