Articles → MONGODB → $Unwind Aggregation Operator In Mongodb

$Unwind Aggregation Operator In Mongodb






Purpose





Syntax


{ $unwind: "<field>" }



Example




Picture showing the sample documents collection




db.authors.aggregate([
  { $unwind: "$authors" }
])



Output


Picture showing the output of $unwind aggregation operator in mongodb



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, June 6, 2024

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250