I want to do the below transformation using mule Dataweave transformation. The input is a array of JSON key value pairs. I need to split the same.
Input
{
"order":[
{
"key":"Status",
"value":"Completed"
},
{
"key":"Source",
"value":"internet"
},
{
"key":"name",
"value":"abc def"
},
{
"key":"domain",
"value":"insurance"
}
]
}
Output
{
"order":[
{
"key":"Status",
"value":"Completed"
},
{
"key":"Source",
"value":"internet"
}
],
"Name":[
{
"key":"name",
"value":"abc def"
},
{
"key":"domain",
"value":"insurance"
}
]
}
Can anyone help?