Can someone help to get joltspec in required format.
Input request:
{
"data": {
"testDetails": [
{
"contactId": "941",
"contactType": "DM"
},
{
"contactId": "1041",
"contactType": "CM"
}
]
}
}
Expected output:
{
"id": "test_details",
"list": [
{
"id": "contact_type",
"value": "DM,CM"
},
{
"id": "contact_id",
"value": "941,1041"
}
]
}
InputSpec:
[
{
"operation": "shift",
"spec": {
"data": {
"#test_details": "Request.dataset.testDetails.param.[0].id",
"@testDetails": "Request.dataset.testDetails.param.[0].list"
}
}
}
]
If i try like this, I am getting same list as it is in input. I have tried using shift but could not make it to get as id value pair which is expected. Can anyone help on this