mongodb set valirables in group after an unwind code example
Example: mongodb unwind
{
$unwind:
{
path: <field path>,
includeArrayIndex: <string>,
// to include documents whose sizes field is null, missing, or an empty array.
preserveNullAndEmptyArrays: <boolean>
}
}