Problem with data response

Hi.
I get a response to a query that is a string json. It starts like this:

["ProductDetails{jsonString='{"productId":"1", xxxxx

If I delete the part ["ProductDetails I can retrieve the data I need from the json. I tested with copy - paste the string json in a text block, and it works fine, but when I use directly the retrieved response it doesn’t work.

I tried to delete this part before decoding the json, but it doesn’t work:

imagen

What I’m doing wrong? How can I manage the response so the data can be retrieved fine? Can the data be managed fine without deleting this part? If I don’t delete this part the text is not recongnized as a dictionary nor a list.
Quite desperate with this.

Thanks in advance.

because you need to remove ] too

1 Like

Which one?

of this arry ["ProductDetails you need to remove ] of it

1 Like

This is the whole response:

Which [ have I to delete, please?

which data that is you need to get it? or you need all of them?

1 Like

I need formattedPrice value.

can you gave me response as text and i will do it for you

1 Like

This is the response as a text:
[ProductDetails{jsonString.txt (1.5 KB)

1 Like

(Using MIT App inventor) – LONG WAY
FetchJSON.aia (2.9 KB)

(Using MIT App inventor) – SHORT WAY
FetchJSON(1).aia (3.2 KB)

Using JsonToDictionary extension by @Mohamed_Tamer

1 Like

Hi @Zagal i detected you can remove ["ProductDetails{jsonString=' and it will work fine you don’t need to remove ]

1 Like

It is already exist in Web component

In MIT App Inventor not in Kodular and I believe here is Kodular’s community :slight_smile:

1 Like

I have this problem:
imagen
I used the Kodular web version but I have this problem:

Thanks, I’ll try this also.
In my experience, the response text can’t be changed. When I use the text block, the changes works, but when I used directly the response block, the text remains the same even using a label block and replacing the text to this label block text.

What happens if you do it like this …? Does it change ?

1 Like

The problem is that the text edited from the response doesn’t change; this doesn’t work:


I tested a lot of variations on this, none worked.
This does:

I will try, I hope it does. But I will do it tomorrow, I’ve been several hours triying this to work and my mind is pretty tired!
Thanks anyway for your interest and help :pray: and same to @mahmoud_hooda !

1 Like

I told you i made it using mit app inventor :point_down:

You can remove Web component and use this extension

1 Like