title: Java Hashmap values to Array
body: <p>I have the following code which adds some arrays to a hashmap but then I want access those arrays to do some work on them later. I've gotten this far but can't figure the rest out to make it work....</p>
  
  <pre><code>import java.util.HashMap;
  import java.util.Iterator;
  import java.util.Map.Entry;
  
      public static void main(String[] args) {
  
          String[][] layer1 = {
              {"to1", "TYPE1", "start"}, 
              {"to2", "TYPE1", "start"}
          };
  
          String[][] layer2 = {
              {"to3", "TYPE2" ,"item1"},
              {"to3", "TYPE2" ,"item2"}
          };
  
          HashMap&lt;String,Object&gt; hashMap = new HashMap&lt;String,Object&gt;();
          hashMap.put("layer1", layer1);
          hashMap.put("layer2", layer2);
  
          Iterator&lt;Entry&lt;String, Object&gt;&gt; iterator = hashMap.entrySet().iterator();
          while(iterator.hasNext()){
              hashMap.values().toArray();
              for (???) {
                  // lets print array here for example
              }
          }        
  
      }
  </code></pre>