title: Fetching Nested JSON Arrays with retrofit?
body: <h2>I searched a lot in Google to find a way to use Nested Json Arrays with Retrofit, but it is useless
  Most of what I found talks about using JSON Objects with retrofit
  And my main issue is how to use the nested Array list inside call method to get data from the server
  I have this
  JSON</h2>
  <pre><code>   {
      &quot;orders&quot;: [
          {
              &quot;ID&quot;: &quot;1&quot;,
              &quot;OrderDate&quot;: &quot;2020-07-01&quot;,
              &quot;order_details&quot;: [
                  {
                      &quot;detail_ID&quot;: &quot;1&quot;,
                      &quot;description&quot;: &quot;new order&quot;,
                      &quot;items&quot;: [
                          {
                              &quot;item_ID&quot;: &quot;1&quot;,
                              &quot;item_name&quot;: &quot;milk&quot;,
                              &quot;Quantity&quot;: &quot;4&quot;,
                              &quot;Price&quot;: &quot;56.0&quot;,
                              &quot;UnitOfMeasure&quot;: &quot;unit&quot;
                          },
                          {
                              &quot;item_ID&quot;: &quot;1&quot;,
                              &quot;item_name&quot;: &quot;nuts&quot;,
                              &quot;Quantity&quot;: &quot;6&quot;,
                              &quot;Price&quot;: &quot;500&quot;,
                              &quot;UnitOfMeasure&quot;: &quot;unit&quot;
                          }
                      ]
                  }
              ]
          }      
     
      ]
  }
  </code></pre>
  <p>And those my other classes</p>
  <h2>Item.java</h2>
  <pre><code>public class Item {
  
  @SerializedName(&quot;item_ID&quot;)
  @Expose
  private String itemID;
  @SerializedName(&quot;item_name&quot;)
  @Expose
  private String itemName;
  @SerializedName(&quot;Quantity&quot;)
  @Expose
  private String quantity;
  @SerializedName(&quot;Price&quot;)
  @Expose
  private String price;
  @SerializedName(&quot;UnitOfMeasure&quot;)
  @Expose
  private String unit_Of_Measure;
  
  public String getItemID() {
  return itemID;
  }
  
  public void setItemID(String itemID) {
  this.itemID = itemID;
  }
  
  public String getItemName() {
  return itemName;
  }
  
  public void setItemName(String itemName) {
  this.itemName = itemName;
  }
  
  public String getQuantity() {
  return quantity;
  }
  
  public void setQuantity(String quantity) {
  this.quantity = quantity;
  }
  
  public String getPrice() {
  return price;
  }
  
  public void setPrice(String price) {
  this.price = price;
  }
  
  public String getUnitOfMeasure() {
  return unitOfMeasure;
  }
  
  public void setUnitOfMeasure(String unitOfMeasure) {
  this.unitOfMeasure = unitOfMeasure;
  }
  
  }
  </code></pre>
  <h2>Order.java</h2>
  <pre><code>public class Order {
  
  @SerializedName(&quot;orders&quot;)
  @Expose
  private List&lt;Order_&gt; orders = null;
  
  public List&lt;Order_&gt; getOrders() {
  return orders;
  }
  
  public void setOrders(List&lt;Order_&gt; orders) {
  this.orders = orders;
  }
  
  }
  </code></pre>
  <h2>OrderDetail.java</h2>
  <pre><code>public class OrderDetail {
  
  @SerializedName(&quot;detail_ID&quot;)
  @Expose
  private String detailID;
  @SerializedName(&quot;description&quot;)
  @Expose
  private String description;
  @SerializedName(&quot;items&quot;)
  @Expose
  private List&lt;Item&gt; items = null;
  
  public String getDetailID() {
  return detailID;
  }
  
  public void setDetailID(String detailID) {
  this.detailID = detailID;
  }
  
  public String getDescription() {
  return description;
  }
  
  public void setDescription(String description) {
  this.description = description;
  }
  
  public List&lt;Item&gt; getItems() {
  return items;
  }
  
  public void setItems(List&lt;Item&gt; items) {
  this.items = items;
  }
  
  }
  </code></pre>
  <h2>Order_.java</h2>
  <pre><code>public class Order_ {
  
  @SerializedName(&quot;ID&quot;)
  @Expose
  private String iD;
  @SerializedName(&quot;OrderDate&quot;)
  @Expose
  private String orderDate;
  @SerializedName(&quot;order_details&quot;)
  @Expose
  private List&lt;OrderDetail&gt; orderDetails = null;
  
  public String getID() {
  return iD;
  }
  
  public void setID(String iD) {
  this.iD = iD;
  }
  
  public String getOrderDate() {
  return orderDate;
  }
  
  public void setOrderDate(String orderDate) {
  this.orderDate = orderDate;
  }
  
  public List&lt;OrderDetail&gt; getOrderDetails() {
  return orderDetails;
  }
  
  public void setOrderDetails(List&lt;OrderDetail&gt; orderDetails) {
  this.orderDetails = orderDetails;
  }
  
  }
  </code></pre>
  <h2>ApiInterface.java</h2>
  <pre><code>@GET(&quot;orders&quot;)
  Call&lt;Order&gt; getAllOrders();
  </code></pre>
  <p>Now I want to get order_detail, item data inside this function</p>
  <pre><code>  order.enqueue(new Callback&lt;Order&gt;() {
              @Override
              public void onResponse(Call&lt;Order&gt; call, Response&lt;Order&gt; response) {
                  if(response.isSuccessful()){
                   //here .................. 
  
                  }
              }
              @Override
              public void onFailure(Call&lt;TaskResponse&gt; call, Throwable t) {
                  Log.w(TAG, &quot;onFailure: &quot; + t.getMessage());
              }
          });
  </code></pre>
  <p>I will be so grateful who can help me</p>