This is on AWS Eventbridge input transformer, AWS UI not code
So i have a JSON
{
"version": "0",
"id": "437e4ed4-8ee1a178",
"detail-type": "blah",
"source": "blahblah",
"account": "011604459942",
"time": "2023-11-20T23:20:14Z",
"detail": {
"transaction_id": 6787,
"customer_id": 1234,
...
"created_at": "2023-11-21T10:19:40.929+11:00",
"updated_at": "2023-11-21T10:19:52.425+11:00"
}
}
and inside that json i have the detail json, i want to reference it with JSONPath to reference but i am failing
Input path
{
"detail": "$.detail"
}
Template
{
"document": <detail>
}
result
{
"document": [object Object]
}
How do i get all the values in detail and not [Object object]? i need to do this cause whats in detail changes per request so i cant list all the values
2
Answers
I think you need to check basic use of
JsonPath
lib, pls check this url (https://github.com/json-path/JsonPath) for more example.example code:
You must add all fields you need from detail to the path:
Also, update your template: