Convertire un testo Json in Csv

Sorry if some similar discussion has already been opened, but I have searched and I don’t seem to have found anything about it in the forum.
Anyone know if it is possible to convert a text from Json format to Csv format? I write below the test text and I attach two images one of the firebase with which I built my object and one that displays the Json text converted to csv through an online tool .

{“1”: {“city”: “” city1 \ “”, “name”: “” name1 \ “”}, “2”: {“city”: “” city2 \ “”, "name “:” \ "name2 " “},” 3 “: {” city “:” \ "City3 " “,” name “:” \ "name3 " “},” 4 “: {” city ": “” city4 \ “”, “name”: “” name4 \ “”}, “5”: {“city”: “” City5 \ “”, “name”: “” name5 \ “”} , “6”: {“city”: “” City6 \ “”, “name”: “” name6 \ “”}, “7”: {“city”: “” City7 \ “”, "name “:” \ "name7 " “},” 8 “: {” city “:” \ "City8 " “,” name “:” \ “name8” “},” 9 “: {” city ": “” City9 \ “”, “name”: “” name9 \ “”}, “structure”: {“city”: “” city \ “”, “name”: “” name \ “”} , “10”: {“city”: “” city10 \ “”, “name”: “” name10 \ “”}}

firebaseTable JsonToCsv

you might want to try the JSON component
https://docs.kodular.io/components/utilities/json/

Taifun

Hi @Taifun , I have tried this component, but I have not been able to obtain the desired result. I probably didn’t know how to use it. But there is no specific function that converts it to Csv.

Try this:

Check the type of double quotes you use.

1 Like

Another solution @enfandroid :

Thanks @juananton1991 I read your discussion on the appinventor forum, thanks for your collaboration. I’m doing tests with @Ken but you made me remember that the web component has the Json text decode function which could be useful as it gives me lists.
I will test with this. Thanks

1 Like

@enfandroid
On this page you can see another example about converting from json to list. I use the split at (list) block
http://kio4.com/appinventor/8N2D_Diccionario_json.htm

2 Likes

Thanks, I did tests with all the information you gave me and something I got, but that’s not really what I want. I want to be able to manage the Jsons automatically, from these I have to generate a csv automatically, I don’t have to indicate the index or the names of the fields.

What makes you do this site is what I want to achieve

https://www.convertcsv.com/json-to-csv.htm

Thanks for your great willingness to help.