Hi friends how to handle the Single JSON Array, I am having a data class which contain set and getURL method. the simple json array is:
"tril" [
"http://www.youtube.com/watch?v=hsTOC-wD-mk&feature=g-logo"
"http://www.youtube.com/watch?v=cHhZwvdRR5c&feature=related"
"http://www.youtube.com/watch?v=l4QWxw655z0&feature=related"
]
My code is:
JSONArray trailerArray = innerJson.getJSONArray(Constant.tril);
for(int i = 0; i < trailerArray.length(); i++) {
String videoUrl = Constant.VIDEO_URL+trailerArray.getString(i);
similarData.setMov_trail(videoUrl);
}
similar data is my data class, i am not able to get all the three videos. i am only getting the last video url how to handle this.