Unwind constructor
Creates $unwind aggregation stage
- field- Field path to an array field.
- includeArrayIndex- Optional. The name of a new field to hold the array index of the element.
- preserveNullAndEmptyArrays- Optional. If- true, if the path is- null, missing, or an empty array,- $unwindoutputs the document. If- false,- $unwinddoes not output a document if the path is- null, missing, or an empty array. The default value is- false.
Implementation
Unwind(Field field,
    {String? includeArrayIndex, bool? preserveNullAndEmptyArrays})
    : super(
          'unwind',
          AEObject({
            'path': field,
            if (includeArrayIndex != null)
              'includeArrayIndex': includeArrayIndex,
            if (preserveNullAndEmptyArrays != null)
              'preserveNullAndEmptyArrays': preserveNullAndEmptyArrays
          }));