I have a JSON payload that I need to loop through:
The below JSON payload is a description of a return trip --> London - New York - San Francisco <–
{
"items": {
"-size": "4",
"flight": [
{
"details": {
"-number": "52",
"-airline-code": "EY"
},
"departure": { "name": "London Heathrow Airport" },
"arrival": { "name": "New York JFK Airport" }
},
{
"details": {
"-number": "8704",
"-airline-code": "EY"
},
"departure": { "name": "New York JFK Airport" },
"arrival": { "name": "San Francisco Airport" }
},
{
"details": {
"-number": "269",
"-airline-code": "EY"
},
"departure": { "name": "San Francisco Airport" },
"arrival": { "name": "New York JFK Airport" }
},
{
"details": {
"-number": "51",
"-airline-code": "EY"
},
"departure": { "name": "New York JFK Airport" },
"arrival": { "name": "London Heathrow Airport" }
}
]
}
}
As you can see, it has multiple arrivals and multiple departure.
How do I define the bubble endpoint logic for iterating through this without code so that multiple flights are created in the database.
Or, is there a bubble limitation - we cannot iterate through a JSON file?
I’m using the bubble Open App and my API workflow endpoint “trip” is available to everyone as also the associated workflow to create a flight.
Thanks !