JPath Read
JPath Read extracts a value from a JSON document using a JPath expression.
It supports selecting:
- Scalar values (string/number/boolean/null)
- Objects
- Arrays
If the selected token is an object or array, it is written as compact JSON.
Parameters
JPATH
JPath expression used to select a token from the input JSON.
Examples:
$.customer.name
$.items[0].sku
$.addresses[?(@.type == 'home')]
Required
INPUT_PARAM
Message parameter name that contains the JSON input string.
Default: INPUT
OUTPUT_PARAM
Message parameter name that receives the extracted value.
Direction: Out
Default: OUTPUT
Execution Context Behavior
- Reads JSON text from INPUT_PARAM.
- Parses the text as a JSON object.
- Selects a token using the JPATH expression.
- Converts the selected token to output:
- Scalar value → string value
- Object/Array → compact JSON string
- Not found → null
- Writes the result to OUTPUT_PARAM.
Example Configuration
| Parameter | Value |
|---|---|
| JPATH | $.customer.name |
| INPUT_PARAM | INPUT |
| OUTPUT_PARAM | CUSTOMER_NAME |
Example Result
CUSTOMER_NAME = John