Closed juandbotiva closed 1 year ago
Hi @juandbotiva You can use the below specs:
[
{
"operation":"modify-overwrite-beta",
"spec":{
"customer_orders":{
"*":{
"sizeOfItems":"=size(@(1,items))"
}
}
}
},
{
"operation":"shift",
"spec":{
"customer_orders":{
"*":{
"sizeOfItems":{
"0":null,
"*":{
"@2":"&4"
}
}
}
}
}
},
{
"operation":"remove",
"spec":{
"customer_orders":{
"*":{
"sizeOfItems":""
}
}
}
}
]
I hope this helps.
Hi @juandbotiva
[
{
"operation": "shift",
"spec": {
"customer_orders": {
"*": {
"items": {
"*": {
"@2": "customer_orders[]"
}
}
}
}
}
}
]
Check this!
Thanks for sharing this @rishabh9926
Thanks for sharing this @rishabh9926
Welcome @janvi04 Ma'am!
Hi, is it possible to have a transformation discard an object if an array inside this object is empty ?
Input
Output
Any suggestions would be greatly appreciated. Thanks in advance.