Overview
The Key Mapping command provides functionality for:- Renaming object fields to match a target schema
- Extracting nested values and promoting them to top-level keys
- Applying consistent field naming across all objects in a collection
Command Type
Command Type ID: 1005Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| mapping | Array of KeyMapping | Defines the rules for extracting data and mapping it to new keys | Yes |
KeyMapping
| Field | Type | Description | Required |
|---|---|---|---|
| to | string | The new key to which the extracted value will be assigned | Yes |
| from | string | A JSONPath query string to extract the value | No |
Usage Examples
Rename Fields
Promote Nested Fields
Map Without Source Path
Common Use Cases
- Schema Normalization: Rename incoming fields to match your internal schema
- Field Promotion: Lift nested values to the top level for easier access
- Data Standardization: Apply consistent field naming across multiple data sources
Related Commands
- Key Mapping With JSONPath - Extract and map using complex JSONPath
- Object Mapper - Full object transformation with mapping config
- Transform By JDM - Transform using JDM mapping rules