Filter constructor

Filter({
  1. required dynamic input,
  2. String? as,
  3. required dynamic cond,
})

Creates $filter operator expression

  • input - an expression that resolves to an array.
  • as - Optional. A name for the variable that represents each individual element of the input array. If no name is specified, the variable name defaults to this.
  • cond - An expression that resolves to a boolean value used to determine if an element should be included in the output array. The expression references each element of the input array individually with the variable name specified in as.

Implementation

Filter({required input, String? as, required cond})
    : super('filter',
          AEObject({'input': input, if (as != null) 'as': as, 'cond': cond}));