title: Android loop through nested hashmaps
body: <p>I'm trying to create nested hashmaps to save user previous jobs like this:</p>
  
  <pre><code>HashMap&lt;String, String&gt; firstJob = new HashMap&lt;String, String&gt;();
      firstJob.put("Title","instructor");
      firstJob.put("From","2008");
      firstJob.put("To","2010");
      firstJob.put("At","Company1");
  
      HashMap&lt;String, String&gt; secondJob = new HashMap&lt;String, String&gt;();
      secondJob.put("Title","PHP developer");
      secondJob.put("From","2010");
      secondJob.put("To","2013");
      secondJob.put("At","Company2");
  
      HashMap&lt;String, String&gt; thirdJob = new HashMap&lt;String, String&gt;();
      thirdJob.put("Title","PHP developer");
      thirdJob.put("From","2013");
      thirdJob.put("To","2018");
      thirdJob.put("At","Company3");
  
      HashMap&lt;String, HashMap&gt; myHashMap = new HashMap&lt;String, HashMap&gt;();
      myHashMap.put("first", firstJob);
      myHashMap.put("second", secondJob);
      myHashMap.put("third", thirdJob);
  </code></pre>
  
  <p>And now I want to loop thorugh it to display it in rows first job then second job etc...</p>
  
  <pre><code>    String txt = "";
  
      Iterator it = myHashMap.entrySet().iterator();
      while (it.hasNext()) {
          Map.Entry pair = (Map.Entry)it.next();
          TextView d = (TextView) findViewById(R.id.data);
          txt += pair.getKey() + " = " + pair.getValue() + "\n";
          d.setText(txt);
      }
  </code></pre>
  
  <p>The pair.getValue() has the whole hashmap value {From=2008, At=Company1, To=2010, Title=instructor} and now I want to iterate it to display it as list</p>
  
  <pre><code>Position:instructor
  Started:2008
  Ended:2010
  At:Company1
  </code></pre>
  
  <p>Then the next job etc ... How can I loop through these inner hashmaps?</p>
  
  <p>If this is not the best way to do it so what's the best way?</p>
  
  <p>Thanks in advance.</p>