title: Iterate over a Map with custom elements in Groovy?
body: <p>It might sound simple, but am kind of struggling with how to iterate over a Map with customised elements/key&amp;value paired and print only lastnames. Any suggestion would be welcomed!</p>
  
  <h2>code</h2>
  
  <pre><code>def map = ['user1':[firstname:'mark',surname:'spencer',role:"developer"],
            ['user2':[firstname:'mark',surname:'melony',role:"developer"]]
  </code></pre>
  
  <h2>Expected output</h2>
  
  <p>lastname 1 : spencer<br>
  lastname 2 : melony </p>