unwind:
It is used for array attribute to show seprate result for that array.
// Inserted data :
db.inventory.insertOne({ "_id" : 1, "item" : "ABC1",
sizes: [ "S", "M", "L"] })
// unwind query
db.inventory.aggregate( [ { $unwind : "$sizes" } ] )
// output
{ "_id" : 1, "item" : "ABC1", "sizes" : "S" }
{ "_id" : 1, "item" : "ABC1", "sizes" : "M" }
{ "_id" : 1, "item" : "ABC1", "sizes" : "L" }