unwind static method
Implementation
static Map<String, Object> unwind({
required String path,
String? as,
bool? preserveNullAndEmptyArrays,
}) {
if (as == null && preserveNullAndEmptyArrays == null) {
return {'\$unwind': "\$$path"};
}
return {
'\$unwind': {
'path': "\$$path",
if (preserveNullAndEmptyArrays != null)
'preserveNullAndEmptyArrays': preserveNullAndEmptyArrays,
if (as != null) 'as': "$as"
}
};
}