title: how to avoid a nested loop
body: <p>I am trying to achieve the following</p>
  
  <pre><code>public class MyObject {
      Map&lt;String, String&gt; myMap;
  }
  
  public class MyOtherObject {
      List&lt;MyObject&gt; myObjects;
  }
  </code></pre>
  
  <p>I want to be able to do the following</p>
  
  <pre><code>for (MyObject myObject: myObjects) {
      Map&lt;String,String&gt; newMap = new Hashmap&lt;String,String&gt;();
  
      for (Map.Entry&lt;String, String&gt; entry : myObject.getMyMap.entrySet() {
          newMap.put(entry.key + "a" , entry.value)
      }
  }
  </code></pre>
  
  <p>How do I avoid this nested loop?</p>