Hi
I’m testing Thunkable platform with a free API service, so I’m trying to receive data from this: https://www.thecocktaildb.com/api/json/v1/1/search.php?s=margarita
I’ve configured API block and I get response object but the problem in that I have a “object of objects” so I need first to access at one property (and it works…) and then to then second one but this doesn’t work .
If I try to use a second “get properties objects” block it go to white page, on the contrary I obtain status 200 and only text like “object, object, object”.
I think the problem is that I get a JSON object…of objects but how to parse and list it?
You will need to show your code and a copy of the response. API formats are all different and without seeing the response you are getting it would very difficult to answer.
Yes, sorry, I done it below
Please show the response you received not the object properties.
[Set ListaTuttilMargarita’s Test to] [response]
If the response is long than save it to a file and upload it in the post.
I looked at the output of the API URL and you need to watch this tutorial because your response has a list which you are not reflecting in your blocks.
Ok, this is the json response.
search.txt (10.8 KB)
I’ve already tried to “concat” another “Get property of object” with the property “strDrink” and , at the end ofcouse, the “Get object JSON/Response” but it crash…
The response shows a key named “drinks” which refers to a list of, I think, 4 items. Each item is also an object with lots of items in it.
So your block has to have a list and choose an item number from the list and a key in the object inside the list, such as “strDrink”.