The Object Mapper command (Command Type: 1016) enables you to map and transform data structures between different formats. This command is essential for restructuring data, mapping fields, and transforming data for downstream processing.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.
Overview
The Object Mapper command provides functionality for:- Mapping fields between different data structures
- Transforming data formats
- Restructuring nested objects
- Combining data from multiple sources
- Creating new data structures from existing data
Command Type
Command Type ID: 1016Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| input | string | Input data reference (e.g., @{PREVIOUS_OUTPUT}) | Yes |
| mapping | object | Field mapping configuration | Yes |
| outputKey | string | Key name for storing mapped result | Yes |
| defaultValues | object | Default values for missing fields | No |
Mapping Configuration
The mapping object defines how input fields map to output fields:Basic Mapping
Array Mapping
Usage Examples
Basic Field Mapping
Nested Structure Mapping
Array Transformation
Mapping with Default Values
Variable Support
The Object Mapper command supports variable interpolation in:- Input: Use
@{VARIABLE}to reference previous command output - Mapping Paths: Use JSONPath expressions in mapping configuration
Common Variable Patterns
- Previous Output:
@{PREVIOUS_OUTPUT}- Output from previous command - Extracted Data: Reference data from Json Path command
- Step Output:
@{STEP_OUTPUT}- Output from previous step
Output Structure
The Object Mapper command creates a new data structure based on the mapping configuration:Output Format
Using Mapped Data
Mapped data can be used by subsequent commands:Best Practices
- Use Descriptive Output Keys: Use clear, descriptive key names for mapped data
- Handle Missing Fields: Use default values for optional fields
- Test Mappings: Test mapping configurations with sample data
- Document Mappings: Document complex mapping logic for maintainability
- Validate Output: Verify mapped data structure matches expectations
Common Use Cases
- Data Transformation: Transform data structures for downstream processing
- Field Mapping: Map fields between different formats
- Data Restructuring: Restructure nested objects
- API Response Transformation: Transform API responses to internal format
- Data Normalization: Normalize data from different sources
Related Commands
- Json Path - Extract data before mapping
- JSON Parse - Parse JSON before mapping
- Sink Commands - Send mapped data to destinations
Troubleshooting
Mapping Errors
If mapping fails:- Verify input data structure matches mapping paths
- Check JSONPath expressions are correct
- Ensure output key is unique
Missing Fields
If mapped data has missing fields:- Use default values for optional fields
- Verify input data contains expected fields
- Check mapping paths are correct