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

Can you share the link to test

sure…

https://streamingfi.000webhostapp.com/insert_pedido.php

need send 4 var to see response…

send

this is the code to session_id to work : tcoupPSqlIPQ7Y0lqvm5R8exuyr2

thanks for help me…

edit: Green box, just numbers

It seems we need to create… But i am asking the one which you get in return the json

Your Json is not formatted correctly

Look here:

Or here:

You can solve this by adding opening and closing brackets to everything and between each element that is contained in the braces insert a “comma”.

For example, your Json looks like this:

{“one”: 1}
{“two”: 2}

And it should look like this:

[
{“one”: 1},
{“two”: 2}
]

Here is a link to a Json validator:

Thanks, I’ve already corrected the error and validated with that website and it doesn’t show an error… I’ll keep trying to get lists. the result I want is that it is a detail of orders made by the customer… and I have to show it… quantity — order - unit price — total price… and that is what the response block is for … thanks for being pending … successes friend…

You can make something like this:

And you would get something like this:

1 Like

Oh is excellent, other cuestion, if i have more than 1 order. how to show it?, meanwhile I’m going to build this one, and try if I can do the search and show more than 1 record…
thanks very much pepocero… i have 7 days in this part, y today all the day and not take the result … :frowning:

edit: my problem not is show 1 item, my problem is this but in list… if you buy 3 hot dog and, 2 hamburguer, and 2 coca cola, this list es cant: 3 -2 - 2 description: hot dog - haburguer, price unit: 3$ - 4$ - 2$ total price: 9$, This is the result I am looking for …

this code does the function I need, I just need to know how to create the list vertically and the other thing that throws me an error… but even with the error it makes me the list I’m looking for… The question is how do I correct the alert and How do I make the vertical list?

error

my json code validated

i find error like this:
The operation convert an alist to a dictionary cannot accept the arguments: , [<!DOCTYPE]