title: How to get nested JSON response in android app using Retrofit?
body: <p>I have this JSON response:</p>
  <pre><code>    {
      Exam_Name:[
       {
          Exam_1:[
              {
                  id:&quot;1&quot;,
                  option_a:&quot;php&quot;,
                  option_b:&quot;css&quot;,
                  option_c:&quot;java&quot;,
              },
              {
                  id:&quot;2&quot;,
                  option_a:&quot;mysql&quot;,
                  option_b:&quot;sqlite&quot;,
                  option_c:&quot;oracle&quot;,
              },
              {
                  id:&quot;3&quot;,
                  option_a:&quot;html&quot;,
                  option_b:&quot;python&quot;,
                  option_c:&quot;javascript&quot;,
              }
          ],
          
          Exam_2:[
              {
                  id:&quot;1&quot;,
                  option_a:&quot;a&quot;,
                  option_b:&quot;b&quot;,
                  option_c:&quot;c&quot;,
              },
              {
                  id:&quot;2&quot;,
                  option_a:&quot;1&quot;,
                  option_b:&quot;2&quot;,
                  option_c:&quot;3&quot;,
              },
              {
                  id:&quot;3&quot;,
                  option_a:&quot;A&quot;,
                  option_b:&quot;B&quot;,
                  option_c:&quot;C&quot;,
              }
          ],
          Exam_3:[
              {
                  id:&quot;1&quot;,
                  option_a:&quot;a1&quot;,
                  option_b:&quot;b1&quot;,
                  option_c:&quot;c1&quot;,
              },
              {
                  id:&quot;2&quot;,
                  option_a:&quot;a2&quot;,
                  option_b:&quot;b2&quot;,
                  option_c:&quot;c2&quot;,
              },
              {
                  id:&quot;3&quot;,
                  option_a:&quot;A1&quot;,
                  option_b:&quot;B1&quot;,
                  option_c:&quot;C1&quot;,
              }
          ]
       }
      
      ]
  }
  </code></pre>
  <p>I am able to get data when I am using <code>SerializedName</code> but I want to know how can I get without <code>SerializedName</code> because I have hundreds of Exam numbers and I can't create <code>SerializedName</code> for all.</p>
  <p>Below I have created the initial model class for inner objects:</p>
  <pre><code>    public class ModelClass implements Serializable {
  
      @SerializedName(&quot;id&quot;)
      @Expose
      private int id;
  
      @SerializedName(&quot;option_a&quot;)
      @Expose
      private String option_a;
  
      @SerializedName(&quot;option_b&quot;)
      @Expose
      private String option_b;
  
      @SerializedName(&quot;option_c&quot;)
      @Expose
      private String option_c;
  
      public ModelClass(int id, String option_a, String option_b, String option_c) {
          this.id = id;
          this.option_a = option_a;
          this.option_b = option_b;
          this.option_c = option_c;
      }
  
      public int getId() {
          return id;
      }
  
      public String getOption_a() {
          return option_a;
      }
  
      public String getOption_b() {
          return option_b;
      }
  
      public String getOption_c() {
          return option_c;
      }
  }
  </code></pre>
  <p>and plz suggest me a way to call Exam_1, Exam_2, Exam_3...... without any <code>SerializedName</code>. Thank you.</p>