I have to tranform a JSON input to a an array containing one objet.
I have this JOLT configuration:
[
{
"operation": "shift",
"spec": {
"tokenType": "key",
"accessToken": "value"
}
}
]
Here's my input:
{
"tokenType": "Bearer",
"refreshToken": "xxx.xxx.xxx",
"accessToken": "yyy.yyy.yyy",
"signature": "secret",
"links": {
"href": "someLink",
"refreshTokenHref": "someLink",
"signoutHref": "someLink"
},
"version": "1.0"
}
Actual output:
{
"key" : "Bearer",
"value" : "yyy.yyy.yyy"
}
Desired output:
[{
"key" : "Bearer",
"value" : "yyy.yyy.yyy"
}]
Do you have any idea how to do that ?
Thx for your help guys
Just found how to do that !