MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本 语法 您可传递字段路径操作数或文档操作数来展开数组字段。 字段路径操作数 您可以将数组字段路径传递给$unwind。使用该语法时,如果字段值为 null、缺失或空数组,则$unwind不会输出文档。
The output generates a new set of documents with the arrayIndex field indicating the position of the course in the original array. 5. $unwind operator on an embedded array The $unwind operator in MongoDB can be used to unwind arrays that are embedded inside other arrays or objects. We have...