Hello!, I have a translation of BOD to .JSON that works correctly, but I also want to report lines of Items for each ShipmentItem that contains the BOD that receives.
The current translation I have is the following :
{
"CODE": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentHeader/AlternateDocumentID/ID"
},
"CODE002": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentHeader/UserArea/Property/NameValue[@name='wm.ext_udf_str4']/text()"
},
"Buy": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentHeader/UserArea/Property/NameValue[@name='wm.ext_udf_str3']/text()"
},
"DOC": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentHeader/UserArea/Property/NameValue[@name='wm.ext_udf_str1']/text()"
},
"items": [{
"CodZ": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentItem/UserArea/Property/NameValue[@name='wm.SUsr2']/text()"
},
"CodB": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentItem/UserArea/Property/NameValue[@name='wm.SUsr1']/text()"
},
"Qty": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentItem/OrderQuantity"
},
"idItem": 0,
"codDep": {
"IonApiRef": "SyncShipment/DataArea/Shipment/ShipmentHeader/WarehouseLocation/ID"
}
}]
}
This generates the .json ok, but I want it to duplicate the Items section when several ShipmentItems are received.
Do you have any example?
Thanks!!
Best regards.