Error with parsing JSON data

Hi all,

I am trying to make an api call and parse the json data to show the text’s title i get back. I have encountered an error and i have fixed it but i don’t know how, i looked at stack overflow solution and fixed it but i don’t know how.

Here are the relevant code screen shots

So the following leads to an error



However i add some changes to this and now it works



The difference is that the API returns an array which you have now defined as:

rather than a json object which has an array inside it as per your original definition: