> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bringits.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Distinct

> Remove duplicate values from a collection based on a specified key

The Distinct command (Command Type: 1010) returns distinct values from a collection based on a specified key. Objects with the same value for the specified key are treated as duplicates and deduplicated.

## Overview

The Distinct command provides functionality for:

* Deduplicating arrays of objects by a specific field
* Retaining the first occurrence of each unique value
* Reducing collection size before downstream processing

## Command Type

**Command Type ID:** 1010

## Parameters

| Parameter | Type   | Description                                                                                                        | Required |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------ | -------- |
| **key**   | string | The property name used to determine uniqueness. Objects with the same value for this key are considered duplicates | Yes      |

## Usage Examples

### Deduplicate by ID

```json theme={null}
{
  "command": "distinct",
  "params": {
    "key": "id"
  }
}
```

### Deduplicate by Name

```json theme={null}
{
  "command": "distinct",
  "params": {
    "key": "name"
  }
}
```

### Deduplicate by Event Type

```json theme={null}
{
  "command": "distinct",
  "params": {
    "key": "eventType"
  }
}
```

## Common Use Cases

* **Deduplication**: Remove duplicate items from scraped data collections
* **Data Normalization**: Ensure unique records before processing or publishing
* **Pre-filter Cleanup**: Reduce redundant entries before downstream commands

## Related Commands

* [Filter](/stream/commands/parse/filter) - Filter items by value
* [Array Join](/stream/commands/parse/array-join) - Join deduplicated values
* [Json Path](/stream/commands/parse/json-path) - Extract fields from deduplicated output
