I want to list 5 day in table but got error it doesn’t response the data.
It is another way to update table.
Can you show more of your blocks here? there’s not enough information to provide you with a meaningful response.
i.e. What I mean here is, we can’t see where you either source or iterate through i or r. We also don’t know how iconurl is assigned a value. Have you tried error logging also, by chance?
When you say
it doesn’t response the data Can you clarify what you mean here too please. What are you expecting to happen? How are you checking for the existence of data in your table.
I think the issue is this Json has nested lists and you’re trying to access them by their position. Instead you need to use the list blocks.
Please read through this thread for more info on the topic
I’m not quite sure what you’re trying to do but maybe it will help to see how I get the weather icon from the OpenWeather API. The last set of blocks is where I get the icon.
The row ID input variable is the row number for my data source.
What I mean is like this
than join strings together
I don’t have a screenshot to share with you at the moment but you’ll need to use a
for each item j in list block and set the list to
get property "weather" of object get object from JSON response. Then, within the loop, get the “icon” property and assign it to a cell/row of your data source. For the row id, you’ll need to use a variable to count up from 1 as the loop iterates.
This should work. I tested it with a list size of one and was able to see the icon property value. I just don’t have a longer JSON response to test it with.
You’ll need to supply your own API url. If it doesn’t work, please supply the API url you are using as text (not a screenshot), removing the API key if you prefer. Please also copy the JSON response from the text input and paste it into a post here as text (it’s best to use the “Preformatted text” icon in the forum toolbar when doing this).
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.