title: Need help in retrieving hash map values from Firestore (Android)
body: <p>I am having trouble retrieving hash map values from Firestore. I have no trouble in uploading the values, but I am having difficulty in retrieving them.
  <img src="https://i.stack.imgur.com/OLblQ.png" alt="Here is my Firestore database."></p>
  
  <p>Here are my constructors:</p>
  
  <pre><code>public class OrderItems {
      private String uid;
      private String product;
      private int qty;
      private int price;
      private int totalPrice;
  
      public OrderItems(){
  
      }
  
      public OrderItems(String uid, String product, int qty, int price) {
          this.uid = uid;
          this.product = product;
          this.qty = qty;
          this.price = price;
      }
  
      public String getUid() {
          return uid;
      }
  
      public String getProduct() {
          return product;
      }
  
      public int getQty() {
          return qty;
      }
  
      public int getPrice() {
          return price;
      }
  
      public int getTotalPrice() {
          return qty * price;
      }
  
      public void setTotalPrice(int totalPrice) {
          this.totalPrice = totalPrice;
      }
  }
  </code></pre>
  
  <p>My hash map constructor:</p>
  
  <pre><code>public class OrderObject {
  
      private HashMap&lt;String, OrderItems&gt; orders;
  
      public OrderObject(){
  
      }
  
      public OrderObject(HashMap&lt;String, OrderItems&gt; orders) {
          this.orders = orders;
      }
  
      public HashMap&lt;String, OrderItems&gt; getOrders() {
          return orders;
      }
  }
  </code></pre>
  
  <p>How do I store the objects using a constructor through an array list? And how can I access the individual fields afterwards? Thank you!</p>