Hi,
For a few days now i’ve been learning about the corona sdk network request and obtaining data from http requests and I just wanted to know how I can take the json data obtained and arrange it in a lists.
For example -
this is my request
https://news.com/v1/articles?source=techcrunch&sortBy=top&apiKey=77eaa5eea3514cc18e04d8fcc712d8a2
and this is the json response–
{ "status": "ok", "source": "techcrunch", "sortBy": "top", "articles": [{ "author": "Catherine Shu", "description": "Samsung Electronics announced today that it has agreed to acquire cloud-computing company Joyent. In a statement, the Korean tech giant said that the..", "title": "Samsung will acquire cloud-computing company Joyent", "url": "http://social.techcrunch.com/2016/06/15/samsung-joyent/", "urlToImage": "https://tctechcrunch2011.files.wordpress.com/2016/06/shutterstock\_175600700.jpg?w=764&h=400&crop=1", "publishedAt": "2016-06-15T21:29:10" }, ...] }
Now to questions -
-
How do i refer to a specific index of json data obtained?
-
I would receive a many numbers of similar block of json data as shown above from one call , can you give an example on using for loop how can i arrange the similar datas in a newsfeed like UI?
Thanks
Kallol