# Filter

Remove data items matching conditions.

## Overview

The Filter node allows you to define conditions, and when the data items match these conditions, they will be removed from the workflow.

## Usage
1. Add the Filter node to your workflow in Suger.
2. Configure conditions to evaluate incoming data.
3. Connect downstream node to the output of this node.
4. Save and activate the workflow.

## Configuration

### Add Conditions
- **Data Type**: Select the type (e.g., String, Number, Date) for comparison.
- **Comparison**: Choose an operation (e.g., `is equal to`, `is greater than`).
- **Value**: Enter the value to compare against.
- **Combination**: Use `AND` or `OR` to combine multiple conditions.

### Options
- **Ignore Case**: Toggle to make string comparisons case-insensitive.
- **Less Strict Type Validation**: Toggle to allow flexible type matching (e.g., comparing a string "123" to a number 123).

<img src="/img/workflow/filter/node.png" alt="Filter node configuration panel with conditions and options" style="max-width:538px;width:100%;display:inline;margin:0 auto;box-shadow:5px 5px 5px #eee" />


### Available Comparisons
#### String
- exists
- does not exist
- is equal to
- is not equal to
- contains
- does not contain
- starts with
- does not start with
- ends with
- does not end with
- matches regex
- does not match regex

#### Number
- exists
- does not exist
- is equal to
- is not equal to
- is greater than
- is less than
- is greater than or equal to
- is less than or equal to

#### Date & Time
- exists
- does not exist
- is equal to
- is not equal to
- is after
- is before
- is after or equal to
- is before or equal to

#### Boolean
- exists
- does not exist
- is true
- is false
- is equal to
- is not equal to

#### Array
- exists
- does not exist
- is empty
- is not empty
- contains
- does not contain
- length equal to
- length not equal to
- length greater than
- length less than
- length greater than or equal to
- length less than or equal to

#### Object
- exists
- does not exist
- is empty
- is not empty
