Hierarchy

  • Filter

Properties

Properties

$filter: {
    as?: string;
    cond: BooleanExpression;
    input: ArrayExpression<any>;
    limit?: NumberExpression;
}

Selects a subset of the array to return an array with only the elements that match the filter condition.

Type declaration

  • Optional as?: string

    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: BooleanExpression

    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.

  • input: ArrayExpression<any>

    An expression that resolves to an array.

  • Optional limit?: NumberExpression

    A number expression that restricts the number of matching array elements that $filter returns. You cannot specify a limit less than 1. The matching array elements are returned in the order they appear in the input array.

    If the specified limit is greater than the number of matching array elements, $filter returns all matching array elements. If the limit is null, $filter returns all matching array elements.

Generated using TypeDoc