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

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

thanks for the help

1 Like

Hey i am getting this error while following this method


please help me
here is my code

You need to pay in order to use newsapi.org. If you check response code and it is 403 that indicates that requests from the browser are not allowed on the Developer plan, except from localhost.

This post was flagged by the community and is temporarily hidden.

Either pay newsapi .org or find another free api

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.

This post was flagged by the community and is temporarily hidden.

In that case it loads all the API content from the beginning to the end

How can I do the reverse thing? from the end to the beginning??

Thank you :slight_smile:


Taifun

Thank you :slight_smile:

I try to make what you make and it’s the same as your block then why would I find a mistake like this? The operation convert an alist to a dictionary cannot accept the arguments: , [<!DOCTYPE]

It means you didn’t get the result as json, instead HTML code you are receiving

1 Like

Did You check your headers block ?

Accept': 'application/json',

Show us your blocks.

Or…

can you help me pls

this is the api link
https://programming-quotes-api.herokuapp.com/quotes/random

And what do you want to retrieve id? author? quote?