Guide: How to get JSON data from an Api using dictionaries (and show it on a dynamic cardview)

Yes… i am using api from https://newsapi.org/

1 Like

You get this cause see post #48

2 Likes

GOT it… Thankyou :grinning_face_with_smiling_eyes:

2 Likes

I got this error please help me
svatky

Just show the blocks you use to get the info and process the info.

1 Like

1 Like

How does the json look that is returned? What api are you using?

1 Like

@NerxStudio try this

But the easiest way is since api responds also in txt to use this blocks

got this now
errorsvatky
and this is my blocks

1 Like

Just set label to get global jmeno

2 Likes

Ok i got this… but it will show only Anna or not?

1 Like

See how this api works here.You search either by name or by date. So you can use a join block and either a textbox to enter name or a date . You have to try it

For example

2 Likes

i got this thank you

2 Likes

Do you think this method will work if the JSON data is in the Php format?

1 Like

If the web response is in json format it will work pakka

1 Like

i am getting a runtime error
My Json Output is in this format

and i get a runtime error

sorry i cannot show more data due to content privacy

but can u help me

my blocks:

Your json is an array with 10 objects so 0 in not a key but array’s index

2 Likes

Thanks,
so what should i do to get it as a dictionary, or be able to store data in any other form ?

Since I do not know the structure of your json I will post an example. My json array is …

[{"a":1, "A":"hello"},{"a":2,"A":"Good morning"}]

image

The blocks I use to work with this is …Actually your response is a list with 10 lists so depending what you what to do you customize your procedure

There is a easy way to get list [1, 2]by using get list by key path and walk all at level.

2 Likes