I have an app where I fetch data from server(json) in the form of array & by using the index i used in my app, like below.
JSONObject topobj = new JSONOb
I just did this yesterday! If you're willing to use a 3rd party library then you can use Google GSON, with the additional benefit of having more concise code.
String json = jsonArray.toString();
Type collectionType = new TypeToken>(){}.getType();
Collection strings = gson.fromJson(json, collectionType);
for (String element : strings)
{
Log.d("TAG", "I'm doing stuff with: " + element);
}
You can find more examples in the user guide.