Member since
05-14-2017
4
Posts
0
Kudos Received
0
Solutions
05-17-2017
04:27 PM
I have the below response from rest API call(InvokeHttpt) and I want to transform as below(wrap whole response in "responseData"), tried using JoltTransforJSON but not getting as expected. Any idea what I am missing? Any help would be appreciated. I/P
{
"query": {
"email": "john@gmail.com",
"count": 1,
"created": "2017-05-17T15:40:21Z",
"lang": "en-US",
"responseCount": 1
},
"responseStatus": {
"status": "success",
"errorCode": "0",
"description": ""
}
}
Expected O/P:
{
"responseData": {
"query": {
"email": "john@gmail.com",
"count": 1,
"created": "2017-05-17T15:40:21Z",
"lang": "en-US",
"responseCount": 1
},
"responseStatus": {
"status": "success",
"errorCode": "0",
"description": ""
}
}
}
Jolt spec I used:
[
{
"operation": "shift",
"spec": {
"query": "responseData",
"*": {
"@": "&"
}
}
}
]
... View more