My solution works both in the official dataweave playground and also the DWCode playground but when executing my solution in the Problem it returns another result:
Expected Output:
{
"refId": "R1",
"invoice": {
"invoiceNo": "INV001",
"status": "POSTED",
"amount": 500,
"postedDate": "2024-01-01"
},
"shipment": {
"shipId": "SHP001",
"trackingStatus": "IN_TRANSIT",
"weight": 5.5
}
}
Actual Output:
{
"refId": "R1",
"invoice": {
"postedDate": "2024-01-01"
},
"shipment": {
"shipId": "SHP001",
"trackingStatus": "IN_TRANSIT",
"weight": 5.5
}
}
If you need the exact code from my solution I will add it as a comment
My solution works both in the official dataweave playground and also the DWCode playground but when executing my solution in the Problem it returns another result:
Expected Output:
{ "refId": "R1", "invoice": { "invoiceNo": "INV001", "status": "POSTED", "amount": 500, "postedDate": "2024-01-01" }, "shipment": { "shipId": "SHP001", "trackingStatus": "IN_TRANSIT", "weight": 5.5 } }Actual Output:
{ "refId": "R1", "invoice": { "postedDate": "2024-01-01" }, "shipment": { "shipId": "SHP001", "trackingStatus": "IN_TRANSIT", "weight": 5.5 } }If you need the exact code from my solution I will add it as a comment