Created 02-16-2021 01:11 AM
How can I do what I’ve sent below in jolt schema ?
{
"cloudCeiling" : [ 1097, null, 1005, 1005],
"dayOfWeek" : [ "Tuesday", "Tuesday", "Tuesday", "Tuesday" ],
"dayOrNight" : [ "D", "N", "N", "N"],
"expirationTimeUtc" : [ 1613538000, 1613534400, 1613530800, 1613527200]
}
converto to
[ {
"cloudCeiling" ,"1097"
"dayOfWeek","Tuesday",
"dayOrNight","D",
"expirationTimeUtc","1613538000"
}, {
"cloudCeiling" ,""
"dayOfWeek","Tuesday",
"dayOrNight","N",
"expirationTimeUtc","1613534400"
}, {
"cloudCeiling" ,"1005"
"dayOfWeek","Tuesday",
"dayOrNight","N",
"expirationTimeUtc","1613530800"
}, {
"cloudCeiling" ,"1005"
"dayOfWeek","Tuesday",
"dayOrNight","N",
"expirationTimeUtc","1613527200"
}]
Created 02-16-2021 01:32 AM
I’ve done like this but it didnt work
[{
"operation": "shift",
"spec": {
"*": {
"*": {
"*": "[#2].&"
}
}
}
}
]
[ { "1097" : null, "Tuesday" : null, "D" : null, "1613538000" : null},
{ "Tuesday" : null, "N" : null, "1613534400" : null},
{ "1005" : null, "Tuesday" : null, "N" : null, "1613530800" : null},
{ "1005" : null, "Tuesday" : null, "N" : null, "1613527200" : null} ]
Created 02-16-2021 02:05 AM
I solved problem thank you
[{
"operation": "shift",
"spec": {
"cloudCeiling": { "*": "[&].cloudCeiling" },
"dayOfWeek": { "*": "[&].dayOfWeek"},
"dayOrNight": { "*": "[&].dayOrNight"},
"expirationTimeUtc": { "*": "[&].expirationTimeUtc"}
}
}]