Please help!!!
I have a solution that uses JSON.decode and pulls data from a PHP page into Corona. Once in Corona the data is as below:
[“Player1”, “123”],[“Player2”, “123”]
I’d like to add this to an SQLite database within Corona. Is there an easy way to loop through the JSON data and insert into a database? The code that successfully populates " decodedData" is:
local function networkListener( event )
if ( event.isError ) then
print( “Network error!”)
else
myNewData = event.response
print ("From server: "…myNewData)
decodedData = (json.decode( myNewData))
end
end
network.request( “http://www.mypage.com/example.php”, “GET”, networkListener )
Where do I go from here? The table entries should be player and score. Thankyou for reading
