Format json from response content

Hello,
I need help with an app that returns a JSON and I would like to format it and make it readable.
I searched the forum but the solutions didn't work in my case.

I'm attaching a screenshot.

image

This is the JSON that I retrieve:

[{"Info1":"text1","Info2":"text2","Result":"text3"}]

And this is what I would like:
[
{
"Info1":"text1",
"Info2":"text2",
"Result":"text3"
}
]

Thank you.

Run the JSON text through a block that replaces ',' with ',\n'

with component JsonTextDecode(jsonText )
convert string to json

http://ai2.appinventor.mit.edu/reference/components/connectivity.html#Web

1 Like

Thank you, could you post an image of the blocks for what you suggest?

I am on my phone.
Later.

1 Like

Thank you very much

This extension has the "Pretty" block

Also search this board for YAML.

With JavaScript

2 Likes
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.