Hi I’am trying a jolt transform of below
{
"Others": {
"eventTime": "2024-09-05T01:50:05.861",
"groupArticleNumber": "IW6012",
"groupModelNumber": "JSO42",
"seasonCode": "20242"
},
"x": [
{
"materialComposition": "100% PET-REC",
"mainMaterialFlag": true
}
],
"y": [
{
"sourcingSizeCode3": "550"
},
{
"sourcingSizeCode3": "540"
}
]
}
and the expected output as
[
{
"eventTime": "2024-09-05T01:50:05.861",
"groupArticleNumber": "IW6012",
"groupModelNumber": "JSO42",
"seasonCode": "20242",
"materialComposition": "100% PET-REC",
"mainMaterialFlag": true,
"sourcingSizeCode3": "550"
},
{
"eventTime": "2024-09-05T01:50:05.861",
"groupArticleNumber": "IW6012",
"groupModelNumber": "JSO42",
"seasonCode": "20242",
"materialComposition": "100% PET-REC",
"mainMaterialFlag": true,
"sourcingSizeCode3": "540"
}
]
I need a jolt spec for same. I have tried so many spec trying multplexing aslo but no luck.
2
Answers
Hi hope this spec helps you resolve your query.
It’s kind of an extension of this former question " #75451057 " :
Loop through the array of objects with highest numbe of objects, namely "y" while transferring whole content of "Others" object and "x" array inside such as
OR