I know there was a similar question, but I didn't find the answer to my next question.
I would create a dictionary with the following JSON structure: { "En": { "KeyOne": "Value One", "KeyTwo": "Value Two" }, "Hu": { "KeyOne": "Első Érték", "KeyTwo": "Második Érték" }, "Sr": { "KeyOne": "Прва Вредност", "KeyTwo": "Друга Вредност" } }
Of course, the key-value pair seen in the Dictionary would have many more key-values pairs.
So many key-values pair would be in dictionary that creating a dictionary graphical would be difficult for me.
I would read the dictionary elements by 'list from csv table text' block from a CSV file, but I don't know what content CSV file could create the above-mentioned JSON structure?
Apparently, I did not ask clearly enough. I would not create a dictionary from a JSON file, but from a CSV file. The JSON file above is just an illustration of the structure of the dictionary to be created.
Yes, please provide the code that would generate a dictionary from the CSV file you have written.
The CSV file above can be easily created as a spreadsheet in LibreOffice Calc spreadsheet, for example; I would save the finished spreadsheet from Calc as a CSV file.
It was not difficult for me to create the attached CSV file. MyDict.csv (240 Bytes)
As I wrote above, I created the table in LibreOffice Calc (see attached image), saved it in CSV format, uploaded it to your project in MIT App Inventor, and as you can see in the attached screenshot, which I took on my phone, the dictionary key-value pairs appeared in both JSON and CSV formats.
Thank you very much for your help! I will then start studying the code you created to learn how to use it in other applications. Thank you very much! I appreciate all the help!