# Deduplicate modifier

Learn how to remove duplicate items from a collection.

This modifier removes duplicate elements from a [collection](/reference/cql/data-types/core/collection). This is useful when you want your collection to behave like a set, where each element only appears once.

When removing duplicate elements, this modifier uses the same [equivalence rules](/reference/cql/expressions/operations/comparison/overview#equivalence) as the [`equal`](/reference/cql/expressions/operations/comparison/equal) operation to ensure consistency in how it determines whether two items are equal.

For maps, there are a few things to keep in mind:

- Keys are not considered for deduplication.
- The order and keys are preserved in the resulting map.
- The first key encountered is retained for duplicate values.

## Syntax

This modifier has the following syntax:

```cql
/*<collection>*/ without duplicates
```

## Parameters

These are the supported parameters:

- `collection`: `collection`

  The collection to deduplicate.

## Examples

Here is a basic example of using this modifier with a list:

```cql
["a", "b", "a", "c"] without duplicates // ["a", "b", "c"]
```

You can also use it to deduplicate a map:

```cql
["a": 1, "b": 2, "c": 1] without duplicates // ["a": 1, "b": 2]
```
