some help required for a jolt transformation that I am trying to achieve. Mainly I need to retain the key_id and contacts element and then group all elements in contacts into an array. This to merge multiple JSON messages into one batch json group
I have this input
[
{
"key_id": "436",
"contacts": [
{
"436": "aaaa-10f2-4cc3-820c-444444444",
"1378": "2021-11-08",
"1381": "2",
"1421": "1"
}
]
},
{
"key_id": "436",
"contacts": [
{
"436": "1111111111-e213-4c90-a8e8-6666gtggggf",
"1378": "2021-11-09",
"1381": "2",
"1421": "1"
}
]
},
{
"key_id": "436",
"contacts": [
{
"436": "xxxxxxxx-e213-4c90-a8e8-xxxxxxxxxxx",
"1378": "2021-11-05",
"1381": "2",
"1421": "1"
}
]
}
]
And would like to transform it with jolt into something like this
[
{
"key_id": "436",
"contacts": [
{
"436": "aaaa-10f2-4cc3-820c-444444444",
"1378": "2021-11-08",
"1381": "2",
"1421": "1"
},
{
"436": "1111111111-e213-4c90-a8e8-6666gtggggf",
"1378": "2021-11-09",
"1381": "2",
"1421": "1"
},
{
"436": "xxxxxxxx-e213-4c90-a8e8-xxxxxxxxxxx",
"1378": "2021-11-05",
"1381": "2",
"1421": "1"
}
]
}
]
I've tried multiple transformations, but no luck so far. Thanks in advance
