mongodb unwin even if blank array code example
Example: unwind check after null or undefined
{
$unwind:
{
path: "$applications",
preserveNullAndEmptyArrays: true
}
}
{
$unwind:
{
path: "$applications",
preserveNullAndEmptyArrays: true
}
}