Skip to main content
The String Manipulation command (Command Type: 1003) performs JavaScript string method operations on a specific field across all objects in a collection.

Overview

The String Manipulation command provides functionality for:
  • Applying any JavaScript string method (e.g. toUpperCase, trim, slice, padStart) to a field
  • Operating across every object in the current collection
  • Passing custom arguments to the string method

Command Type

Command Type ID: 1003

Parameters

ParameterTypeDescriptionRequired
keystringSpecifies the field in the object where the string manipulation will be appliedYes
methodNamestringThe JavaScript string method to apply to the specified fieldYes
parametersArray of string / numberThe arguments to pass to the method. Requirements depend on the method usedYes

Usage Examples

Convert to Uppercase

{
  "command": "string-manipulation",
  "params": {
    "key": "name",
    "methodName": "toUpperCase",
    "parameters": []
  }
}

Trim Whitespace

{
  "command": "string-manipulation",
  "params": {
    "key": "title",
    "methodName": "trim",
    "parameters": []
  }
}

Slice a String

{
  "command": "string-manipulation",
  "params": {
    "key": "code",
    "methodName": "slice",
    "parameters": [0, 5]
  }
}

Pad a String

{
  "command": "string-manipulation",
  "params": {
    "key": "id",
    "methodName": "padStart",
    "parameters": [8, "0"]
  }
}

Replace a Substring

{
  "command": "string-manipulation",
  "params": {
    "key": "description",
    "methodName": "replace",
    "parameters": ["old text", "new text"]
  }
}

Common Use Cases

  • Normalization: Trim whitespace or convert case across all records
  • Formatting: Pad IDs or codes to a fixed length
  • Data Cleaning: Remove or replace known bad substrings from a field
  • Regex - Apply regex-based transformations to string fields
  • String Split - Split a string field into an array
  • Key Mapping - Rename fields after manipulation