title: print scala array of tuples with a map
body: <p>I have an Array of Tuple2 that contains a String and a map, and I'd like to print for each tuple2 as many rows as the number of keys of the map. This is what I wrote:</p>
  
  <pre><code>val a = Array(
             ("foo", HashMap(1-&gt;"f1", 2-&gt;"f2")),
             ("bar", HashMap(1-&gt;"b1", 2-&gt;"b2"))
          )
  
  for (sourceNode &lt;- a) {
     for (destNode &lt;- sourceNode._2) {
       println("value [" + sourceNode._1 + "] for [" + destNode._1 + "] is '" + destNode._2 + "'")
     }
   }
  </code></pre>
  
  <p>and here is the result:</p>
  
  <pre><code>value [foo] for [1] is 'f1'
  value [foo] for [2] is 'f2'
  value [bar] for [1] is 'b1'
  value [bar] for [2] is 'b2'
  </code></pre>
  
  <p>The result is correct, but is there a more concise (and functional) way to obtain this result?</p>
  
  <p>Thanks,
  Andrea</p>