Closed praveenvsl closed 1 year ago
[
{ // form objects from array keys vs. array components
"operation": "shift",
"spec": {
"GroupMembers": {
"*": {
"*": {
"$1": "&3.&2.&1.groupId", // partition by top level object, array and its indexes
"@": "&3.&2.&1.memberId"
}
}
}
}
},
{ // collect each key-value pairs under the common array node, namely "GroupMembers"
"operation": "shift",
"spec": {
"*": {
"*": {
"*": "&2[]"
}
}
}
}
]
I'm trying to convert an array of strings into objects. Which is not workings as I expected. Can someone help me on this
Input:
Expected output:
My Spec: