
JSONata TransformValue
CertifiedTransform or query a JSON string using JSONata
JSONata TransformValue
Transform or query a JSON string using JSONata
JSONata is a query and transformation language for JSON data.
type: io.kestra.plugin.transform.jsonata.TransformValueExamples
Transform JSON data using a JSONata expression
id: jsonata_transform_value
namespace: company.team
tasks:
- id: transform_json
type: io.kestra.plugin.transform.jsonata.TransformValue
from: |
{
"order_id": "ABC123",
"first_name": "John",
"last_name": "Doe",
"address": {
"city": "Paris",
"country": "France"
},
"items": [
{
"product_id": "001",
"name": "Apple",
"quantity": 5,
"price_per_unit": 0.5
},
{
"product_id": "002",
"name": "Banana",
"quantity": 3,
"price_per_unit": 0.3
},
{
"product_id": "003",
"name": "Orange",
"quantity": 2,
"price_per_unit": 0.4
}
]
}
expression: |
{
"order_id": order_id,
"customer_name": first_name & ' ' & last_name,
"address": address.city & ', ' & address.country,
"total_price": $sum(items.(quantity * price_per_unit))
}
Properties
expression *Requiredstring
The JSONata expression to apply on the JSON object
from *Requiredstring
The value to be transformed
Must be a valid JSON string.
maxDepth integerstring
1000The maximum number of recursive calls allowed for the JSONata transformation
Limits recursive JSONata function call depth. Each recursive call adds a frame to the chain traversed by variable lookup, so high values can cause a JVM StackOverflowError on platforms with small default thread stacks (e.g. Windows ~256 KB vs Linux ~512 KB). Raise only for expressions with proven deep recursion needs.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
value object
The transformed value