I am hitting the RouteXL API RouteXL API | RouteXL to optimise Routes using the Bubble API Connector. Unfortunately, the JSON response from the API adds a Key to each array list item and doesn’t use square brackets. This means that the response is being detected as multiple fixed fields rather than a list of things (see the image below which shows the response I get in red). The response in blue is where the response has been hacked to remove the Array Keys and add square brackets.
This is the response API to force Bubble API connector to find a ‘list’:
{
"id": "4T4446Pj",
"count": 4,
"feasible": true,
"route": [
{
"name": "The Hague, The Netherlands",
"arrival": 0,
"distance": 0
},
{
"name": "The Hague, The Netherlands",
"arrival": 5,
"distance": 3.9
},
{
"name": "Uden, The Netherlands",
"arrival": 93,
"distance": 137.1
},
{
"name": "Sint-Oedenrode, The Netherlands",
"arrival": 112,
"distance": 160.5
}
]
}
But this is the response I get from the API:
{
"id": "ExEJ6I4P",
"count": 4,
"feasible": true,
"route": {
"0": {
"name": "The Hague, The Netherlands",
"arrival": 0,
"distance": 0
},
"1": {
"name": "The Hague, The Netherlands",
"arrival": 5,
"distance": 3.8
},
"2": {
"name": "Uden, The Netherlands",
"arrival": 100,
"distance": 137.1
},
"3": {
"name": "Sint-Oedenrode, The Netherlands",
"arrival": 118,
"distance": 158.1
}
}
}
Is there any way to get the API connector to detect this style of array (which is valid JSON) so I can use the response in a repeating group/database list of things, etc.?