title: How do you do nested iterators in groovy?
body: <p>Does groovy support any kind of nested iterator notation?</p>
  
  <p>In the example below, I want to somehow get the projectName value, that came from the outer iterator, into my inner iterator. Is this possible without storing in a variable? In my example I get a runtuime error that "project" is not found</p>
  
  <pre><code>it.myprojects.project.each{
       println("Project name: " + it.projectName)
      it.myroles.role.each{
           Role role = new Role()
               role.setName(project.projectName)//how do I get projectName here without storting it in a variable in the outer loop?
      }
  }
  </code></pre>