Overview
The Key Mapping With JSONPath command provides functionality for:- Extracting values from deeply nested structures using JSONPath
- Mapping extracted values to new top-level keys
- Transforming complex objects into flat, normalized structures
Command Type
Command Type ID: 1012Parameters
| 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
Extract and Rename Nested Fields
Flatten a Deep Hierarchy
Common Use Cases
- Deep Extraction: Pull values out of deeply nested JSON paths
- Flat Output: Produce flat objects from hierarchical input for sink commands
- Schema Mapping: Map arbitrary incoming structures to a fixed output schema
Related Commands
- Key Mapping - Simpler field renaming without deep path queries
- Json Path - Extract arrays or multiple values via JSONPath
- Object Mapper - Full object transformation