Make a list with JSON information

Hello guys, i need some help to make a clickable list with some information.

I want to make a List clickable showing just de “nm_campeonato”. but i’m having some trouble.

this is my code and result for now:

and this is an example what i want to make

I just read it quickly on my phone, dont have my laptop with me but hope it will help.

I think you almost got it, have you tried to extract the property “nm_campeonato” from the object response using the pink block called get property of object?

Hope it helps

This is not typically how you parse JSON in Thunkable. See this video I made that explains the process: API JSON Tutorial (Video)

I can help you with this if you’re able to post the full JSON response as text here.

Your method would potentially work but you would have to use several text blocks to get the subststring after your property name by creating a list based on the delimiter “,” and then searching for “:” and getting the text after that.

@sammycri The solution to this is to add the code on the screenshot


like this? the screen just blink and desapear :smiling_face_with_tear:

@sammycri The problem is with the JSON, the one you shared above is not a valid format. I can help but let’s have a closer conversation. Could you send me a message on my LinkedIn?

Ty @John_Rouger, i’m not able to send u a message, i’m not premium in linkedin, can you send me one pls, i’m already followin you
My linkedin

@sammycri sent

1 Like


This is my JSON

Please post it as text. I can’t do much with a screenshot of JSON.

i already solved with @ioannisroungeris tips, but ty @tatiang!

2 Likes

Can you please tell me the solution to this? the screen disappearing after a blink. Happens with mine too.

1 Like

Hi @jayalakshmi.venkates, welcome to Thunkable!

It would be best to post your JSON as text and include a screenshot of the blocks you are using to parse it. It was suggested that the blink was caused by invalid JSON or invalid parsing.

Hi

This is my API with country code and an API key appended to it.
https://newsapi.org/v2/top-headlines?country=

And this is my code block:

Not sure why it blinks and vanishes

Again, without the full JSON response posted here as text, I really can’t help you. Especially when you hide the URL because that’s what’s going to determine what kind of response you get from the API server. Which endpoint are you using?

You can get the response by assigning the green response block to a Text Input’s Text (set Text Input’s text to [response]) and then after live testing the project, copy the response from the text input and paste it into a post here.

This is part of the JSON response (it doesn’t allow me to show the rest of the text here):
{

It looks like you are probably parsing the JSON correctly. To know for sure, I’d have to see the whole JSON response. But one thing you can do is to place Wait blocks after each of the Set blocks and see if the Images and Label’s are getting set correctly. If you slow things down, you might have a better idea what’s going on.

Thank you very much! Ill try that.

try also that

Will try it. Thank you!