I am trying to create a jolt transformation for the below input;
{
"group": [
{
"schema": "file"
},
{
"key1": "val1",
"key2": "val2"
},
{
"schema": "folder"
},
{
"key1": "val1",
"key2": "val2"
},
{
"schema": "dir"
},
{
"key1": "val1",
"key2": "val2"
},
.....more
]
}
With the desired output of;
{
"group": [
{
"schema": "file",
"key1": "val1",
"key2": "val2"
},
{
"schema": "folder",
"key1": "val1",
"key2": "val2"
},
{
"schema": "dir",
"key1": "val1",
"key2": "val2"
},
.....more
]
}
The key 'schema' will always be present but I won't know what the key1,key2,etc values are. So I can't explicitly map them. Any help would be much appreciated!
