Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JSONArray moviesArray = jsonObject.getJSONArray("Movies");
- for (int j = 0; j < moviesArray.length(); j++)
- {
- JSONObject moviesObject = moviesArray.getJSONObject(j);
- JSONArray marvelArray = moviesObject.getJSONArray("Marvel");
- JSONArray dccArray = moviesObject.getJSONArray("DC COMICS");
- .......
- for (int k = 0; k < (DOUBT HERE).length(); k++)
- {
- JSONObject moviesJsonObj = (DOUBT HERE).getJSONObject(k);
- String movieName = moviesJsonObj.getString("Release Year");
- String releaseYear = moviesJsonObj.getString("DeityName");
- Movies movies = new Movies(movieName, releaseYear)
- moviesList.add(movies);
- moviesAdapter= new moviesAdapter(moviesList);
- recyclerView_Marvel.setAdapter(moviesAdapter);
- recyclerView_DCComics.setAdapter(moviesAdapter);
- i have stored Marvel movies in marvel array and dc movies in dc array. now i need to pass both of these arrays into another class to extract the movie name and release year and then put them in a recycler view.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement