For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hello Cloud People
I was wondering if someone can give an example of how to map to a complex 3 level json for a REST post from OIC.
Use case:
This is for a sales order where an order has multiple items, those items can and will have quantities greater than 1 and each of those quantities will have a serial number attached to it
So far, I'm able to get single items with the serial numbers but cannot figure out how to get multiple items with serial numbers into a json.
Example of what is needed
{
"sales order": {
"InvoiceNumber": "132456789",
"items": [
{
"ItemName": "laptop model 1",
"QTY": 4,
"serialNumbers": [
123,
234,
345,
456
]
},
{
"ItemName": "mouse model x1",
"QTY": 2,
"serialNumbers": [
321,
432
]
}
]
}
}
Can someone please give me pointers on how to map this beast?
Comment
Can you provide more details?
In the Orchestration, the REST responses get translated into XML... So I cannot connect the dots you trying to read a JSON object.
Be the first to rate this
|
Sign in to rate this
Assuming the sampling of JSON is done correctly (like using exact sample as below)::
items in this case would be a repeating element. So use a for-each in your source and map accordingly or right click and say repeat the element and then do individual mapping.
Same with the case of serialNumbers within items element.
Be the first to rate this
|
Sign in to rate this