I am trying to make an Ecommerce website with Oracle Apex through a REST Data Source. I am trying to Have a Page where it shows a report with each row being an different order.
Here is an example of an order I am getting back from the REAT API:
{
"order_number": "79dd96df-f189-4442-81de-30f71ac1ad4b",
"order_date": "12/23/2021",
"first_name": "Vicki",
"last_name": "Sandison",
"email": "[email protected]",
"ip_address": "94.181.194.57",
"credit_card": "5108757976296637",
"currency_code": "USD",
"city": "Cincinnati",
"street": "83 Grim Center",
"state": "Ohio",
"postal_code": "45233",
"log_data": "¡™£¢∞§¶•ªº–≠",
"lines": [
{
"product": "Napkin - Dinner, White",
"quantity": 7,
"price": "$71.33",
"item_image": null
},
{
"product": "Pork - European Side Bacon",
"quantity": 9,
"price": "$102.25",
"item_image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAG+SURBVDjLnZNNSwJRFIbfGccPCKJMoqSwdBcEobUQWrmIChJs07pVuA36By0KWrTtB7hqGSQSFBGCbdq0ECkhSmgxldmHOuP9aO4VpSEV6cDhHu7c85z3nLkXnHP048/RKO+0r6JPO9nc7LivCErL8vk8p5SCEILWKlzXdWSzWfj9foRCIcTjcaWVo/2mNRoNBINBGf8GizgWi8k1k8nYFNgAopqwi0KzM2oxKAMYZ5YiYHmGwDCM7gDTNGWV8Fi54yCBof4AudKwrEpYUwGxqjPGkZgjqNfrvQHCFsZfuvzO4d4KxEdx8PLBa/XPpQJGm7PgloKN+UZvBRX6LgGLk3oXBV588c/OgJ1ccso15MEKX7X6ZUilUlBVFYqiyDWRSKBivONxvGgDtG+ilTStOh3IV25lNU3TEA6HEYlEZCyg5VoZrgEX1o6W122A7ezWIKhyPuL04ayUlodFkvCWihqpYv9qFwFfAMSkB0uHsdk2gBKaNEyT3+kFfL9Wkbk5BXMyOByONiR9nYZWd+Ht40VcOD8lbLc9A3rs2ZMPw/IqKAq4l/JKxZKtX68yitenMibMgNtteuJ/HtN/7AcakErwOe40HwAAAABJRU5ErkJggg=="
},
{
"product": "Pie Filling - Cherry",
"quantity": 5,
"price": "$189.03",
"item_image": null
}
]
}
Right now the REST Data Source in inserting to the Orders_local table but the lines section is a nested data array and I am having trouble accessing the data and I thought It would be nice to be able to insert the product information with the order_number into another table and make a foreign key relationship.
How can I Achieve this or is there a better way of doing this?