First of all, congratulations on this wonderful tool. It works even better than advertised.
I have a case I have been trying to solve for some time now. I have a conditional transformation with nested arrays and I simply cant seem to make it work.
First Input
{
"transportType": "VEHICLE",
"mechanical": "yes",
"types": [
{
"type": "car",
"door": "4",
"wheels": 4
},
{
"type": "bus",
"door": "3",
"wheels": 6,
"fare": 32
}
]
}
And the other input is
{
"transportType": "HORSE",
"mechanical": "no",
"type": "horse",
"legs": "4",
"attribute": "speed"
}
The second case is simple and works fine. But the first one with the nested array in there is not working. Can you help steer me in the correct direction?
First of all, congratulations on this wonderful tool. It works even better than advertised.
I have a case I have been trying to solve for some time now. I have a conditional transformation with nested arrays and I simply cant seem to make it work. First Input { "transportType": "VEHICLE", "mechanical": "yes", "types": [ { "type": "car", "door": "4", "wheels": 4 }, { "type": "bus", "door": "3", "wheels": 6, "fare": 32 } ] }
And the other input is { "transportType": "HORSE", "mechanical": "no", "type": "horse", "legs": "4", "attribute": "speed" }
The second case is simple and works fine. But the first one with the nested array in there is not working. Can you help steer me in the correct direction?
Spec [ { "operation": "shift", "spec": { "transportType": { "VEHICLE": { "#pollutor": "yes", "@(2,mechanical)": "automtive", "@(3,types[0].type)": "vehicleType[0].type" }, "HORSE": { "@(2,mechanical)": "automtive", "@(2,type)": "animal.type", "@(2,legs)": "animal.legs", "@(2,attribute)": "animal.attribute" }, "null": { "# ": "MTA" } } } } ]
Regards. Gaurav.