@amirfarazmand said
having trouble reading cell values in json. I am fairly sure Corona’s json is not working fine
Your sample code works fine for me. I changed your line:
for key,value in pairs(tables) do print(key,value) end
to
print("tables: ", json.prettify(tables))
and I get a bunch of data:
Jan 30 14:51:30.293 tables: { "encoding":"UTF-8", "feed":{ "xmlns$gsx":"http://schemas.google.com/spreadsheets/2006/extended", "openSearch$totalResults":{ "$t":"2" }, "link":[{ "rel":"alternate", "type":"application/atom+xml", "href":"https://docs.google.com/spreadsheets/d/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/pubhtml" },{ "rel":"http://schemas.google.com/g/2005#feed", "type":"application/atom+xml", "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values" },{ "rel":"http://schemas.google.com/g/2005#post", "type":"application/atom+xml", "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values" },{ "rel":"self", "type":"application/atom+xml", "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values?alt=json" }], "id":{ "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values" }, "author":[{ "name":{ "$t":"amirfarazmand" }, "email":{ "$t":"amirfarazmand@gmail.com" } }], "updated":{ "$t":"2016-01-30T12:52:27.096Z" }, "title":{ "$t":"Sheet1", "type":"text" }, "category":[{ "scheme":"http://schemas.google.com/spreadsheets/2006", "term":"http://schemas.google.com/spreadsheets/2006#list" }], "entry":[{ "updated":{ "$t":"2016-01-30T12:52:27.096Z" }, "gsx$age":{ "$t":"Number111" }, "title":{ "$t":"This is first senstence.", "type":"text" }, "category":[{ "scheme":"http://schemas.google.com/spreadsheets/2006", "term":"http://schemas.google.com/spreadsheets/2006#list" }], "id":{ "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cokwr" }, "gsx$name":{ "$t":"This is first senstence." }, "content":{ "$t":"age: Number111", "type":"text" }, "link":[{ "rel":"self", "type":"application/atom+xml", "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cokwr" }] },{ "updated":{ "$t":"2016-01-30T12:52:27.096Z" }, "gsx$age":{ "$t":"Number222" }, "title":{ "$t":"This is second sentences.", "type":"text" }, "category":[{ "scheme":"http://schemas.google.com/spreadsheets/2006", "term":"http://schemas.google.com/spreadsheets/2006#list" }], "id":{ "$t":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cpzh4" }, "gsx$name":{ "$t":"This is second sentences." }, "content":{ "$t":"age: Number222", "type":"text" }, "link":[{ "rel":"self", "type":"application/atom+xml", "href":"https://spreadsheets.google.com/feeds/list/1Sp18\_fOs8SSP\_fwB54lv7IoL42uDaioZM1LTRD4rL8o/od6/public/values/cpzh4" }] }], "openSearch$startIndex":{ "$t":"1" }, "xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/", "xmlns":"http://www.w3.org/2005/Atom" }, "version":"1.0" }