Json has me lost


#1

I have searched here and Google and still can’t get a handle on the blocks for json. I have a site that the json decodes to

{“records”:[{“id”:“recK9cvGX1hekSZHJ”,“fields”:{“Version”:“v4.2.3”,“Name”:“Title 1”,“Type”:“Official”,“Image”:[{“id”:“attDawTYspF2ezBXl”,“url”:“https://dl.xxxx.com/ZmmvHJeSQOO3cagFH9AO_title1.png",“filename”:“title1.png”,“size”:20252,“type”:“image/png”,“thumbnails”:{“small”:{“url”:“https://dl.xxxx.com/NtqpsDliRCq6kOCrrm3h_small_title1.png”,“width”:36,“height”:36},“large”:{“url”:“https://dl.xxxx.com/6DlZXqiTBKb2rpqJxsHw_large-title1.png”,“width”:180,“height”:180},“full”:{“url”:“https://dl.xxxx.com/i0jH9jXURG6dtOpUYYjl_full_title1.png”,“width”:180,“height”:180}}}],“APK”:[{“id”:“attRuFXXuONdL9gO9”,“url”:“https://dl.xxxx.com/DQdfJ6unR7inflpU2hXZ_title1v4.2.3.apk”,“filename”:"Title1 v4.2.3.apk”,“size”:27814452,“type”:“application/vnd.android.package-archive”}],“Description”:“Description goes here”},“createdTime”:“2018-08-21T21:31:27.000Z”},{“id”:“reczJjRiWBNm7ayEX”,“fields”:{“Version”:“v2.0.5.0”,“Name”:“Title 2”,“Type”:“Pro”,“Image”:[{“id”:“atte4PLlqdpsdZmKD”,“url”:“https://dl.xxxx.com/whMLwTiZQbOzWroTyEH4_title2.png",“filename”:“title2.png”,“size”:12276,“type”:“image/png”,“thumbnails”:{“small”:{“url”:“https://dl.xxxx.com/gzX8c03vS9SSIof5RVtK_small_title2.png”,“width”:36,“height”:36},“large”:{“url”:“https://dl.xxxx.com/0ByLNJpnQm5y1wG36fZu_large_title2.png”,“width”:300,“height”:300},“full”:{“url”:“https://dl.xxxx.com/cHaB6aBSQ3CxEPoRgVzq_full_title2.png”,“width”:300,“height”:300}}}],“APK”:[{“id”:“attd1y4A4bw9o2RZd”,“url”:“https://dl.xxxx.com/tdF0kb98QR65vkvK8vHv_title2v2.0.5.0.apk”,“filename”:"Title2 v2.0.5.0.apk”,“size”:7611508,“type”:“application/vnd.android.package-archive”}],“Description”:“Description goes here”},“createdTime”:“2018-08-21T21:46:19.000Z”}]}

i want to list all entries on the same screen, with the name, version on one line, logo next line, description after that and then make a link to download. So far all I have figured out is how to make one column in a listview, which is far removed from what I need.

Any pointers on starting, please???


#2

How to work with Lists by Saj
How to work with Lists and Lists of lists (pdf) by appinventor.org
JSON and list of lists: example1 and example2
Easy to decode large information with JSON format by Carlos
A general purpose JSON browser routine by ABG

Taifun


#3

Thanks Taifun, I’ve seen you post this before and I have been through it and still can’t make heads or tails of it. Hence asking for a few starting points. Everything else I have been able to work out myself, but this has just thrown me. I can get my head around decoding JSon and getting one particular record’s details, but not how to pull them all at once and make them useable.

If it was php I could have written 100 scripts on it in the time I have spent getting nowhere in Thunkable!


#4

Hi @Kraftynic,

Perhaps something like this might be helpful to get started? It only has a few parameters so is a fairly compact file to work with.


#5

Hi Domhnall. This is an aia file I downloaded a few weeks ago as a start point and its great! this is one that got me able to pull one record and show the results, but I still don’t understand how to pull several records at once and display them :frowning:

Like I said, php is easy. Just use a for each to repeat each record in a readable format. Trying an if statement or for each to set label text in Thunkable only shows the last record, not them all.