I have an input as below:
{
"total": "12",
"sub" : [
"6", "6", "4", "8", "12"
]
}
I want an output as below:
[
[6,6],
[4,8],
[12]
]
I want to add the fields into array based on the total of their values, i.e.., each array in output should contain number equal to the total. And the next number should go to next array and so on. Can that be possible using JOLT?