title: Scala - iterate and print a map of maps
body: <p>How do I print a map of maps?</p>
  
  <p>I have written   </p>
  
  <pre><code>map foreach (x =&gt; println (x._1 + "--&gt;" + {x._2 foreach {y=&gt; println( y._1 +" -&gt;"+ y._2)}}))
  </code></pre>
  
  <p>It works.<br>
  But it looks like a hack. </p>
  
  <p>Is there a better way to write it in Scala.</p>