Need Help with Jolt Transformation - Stuck for Days
Hii Everyone,
I've been struggling to achieve the desired result with a Jolt transformation for the past few days and could really use some help from the community.
input.json:
{
"email": "abcmail@gmail.com",
"dates": [
{
"date": "2023-12-01",
"type": "full"
},
{
"date": "2023-11-03",
"type": "full"
},
{
"date": "2023-11-02",
"type": "full"
},
{
"date": "2023-10-01",
"type": "half"
}
]
}
output.json
[
{
"emailId": "abcmail@gmail.com",
"date": "2023-12-01",
"type": "full"
},
{
"emailId": "abcmail@gmail.com",
"date": "2023-11-03",
"type": "full"
},
{
"emailId": "abcmail@gmail.com",
"date": "2023-11-02",
"type": "full"
},
{
"emailId": "abcmail@gmail.com",
"date": "2023-10-01",
"type": "half"
}
]
spec file for the transformation:
[
{
"operation": "shift",
"spec": {
"*": {
"email": "[].emailId",
"dates": {
"*": {
"date": "[&1].date",
"type": "[&1].type"
}
}
}
}
}
]
Despite my efforts, I'm not achieving the expected outcome. Can anyone please review my Jolt specification and provide insights on what might be going wrong? Your assistance is highly appreciated.
Thank you in advance!

