title: Jenkins, Multibranch Pipeline: how to iterate params map
body: <p>I have a multibranch pipeline in Jenkins. 
  I defined multiple check boxes (over 20) for each parameter to be passed to a script, which then starts my application and runs corresponding test case (this might not be an optimal solution but this framework was created before I started at current company and I am not going to refactor it):</p>
  
  <pre><code>booleanParam(name: 'cluster_number', defaultValue: false, description: '')
  booleanParam(name: 'post_cluster_wu', defaultValue: false, description: '') 
  etc.
  </code></pre>
  
  <p>I need to collect user selection for each checkbox (true-false). I would prefer to do it in a loop, like this:</p>
  
  <pre><code>sh """
  
  for (element in params) {
  // testing:
      echo "${element.key} ${element.value}"
  }
  """
  </code></pre>
  
  <p>but keep getting an error:</p>
  
  <pre><code>[Pipeline] End of Pipeline
  groovy.lang.MissingPropertyException: No such property: element for class: groovy.lang.Binding
      at groovy.lang.Binding.getVariable(Binding.java:63)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onGetProperty(SandboxInterceptor.java:264)
      at org.kohsuke.groovy.sandbox.impl.Checker$6.call(Checker.java:288)
  </code></pre>
  
  <p>Also tried to put loop outside of shell script. No luck so far.</p>
  
  <pre><code>steps {
          echo "username: ${params.OWNER_USERNAME}"
  
          for (element in params) {
              echo "${element.key} ${element.value}"
          }
  ...
  </code></pre>
  
  <p>Wonder if anyone was able to loop through params?
  Thanks in advance! </p>