So with the API Connector i get Screenshot by Lightshot
But i need a list of dates, which are not available (available: 0)
And also when the user pics a date range i need to check the “min_length_of_stay”
So i also need to this field in a working structure. Same for “price” to calculate the price of the date range.
Can you provide the setting of your API Connector call and also, the Raw data? (when you get the result, check at the bottom, you have access to raw data)
At first sight it seem to be an API that return a dictionnary and you will not be able to work with this directly in Bubble API Connector.
From my experiance i would just avoid this API provider. My reasoning be is this particular API call is not suppose to be formatted this way. They return an object within another object (list), what they should be returning is an object with an array of objects.
Now since they send a list of objects as nested in an array Bubble will never interpret this correctly. To be clear Bubble follows standard JSON approach while this API does not. The only way i can think off is to introduce a middle-ware service between Bubble and the API to handle correcting this. Or check to see if you can use this call directly with zapier
Exact or a plugin that will be able to transfert your json into an array instead. and it will not be easy because you will need to loop almost each part.
Whoever thought that this was a good way to do JSON (and the input dates in an array are a bit dumb as well) … needs to have a stern word with themselves.