Skip to main content
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

ParameterTypeDescriptionRequired
keystringThe property name used to determine uniqueness. Objects with the same value for this key are considered duplicatesYes

Usage Examples

Deduplicate by ID

{
  "command": "distinct",
  "params": {
    "key": "id"
  }
}

Deduplicate by Name

{
  "command": "distinct",
  "params": {
    "key": "name"
  }
}

Deduplicate by Event Type

{
  "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