title: How to access Jenkinsfile parameters values as strings in a loop
body: <p>In our Jenkinsfile  we have a lot of parameters (parameterized build) and in this case I want to check if each parameter is toggled and act on that. These parameters have similar names but end with a different decimal, so I would like to iterate over them to achieve this.</p>
  
  <p>I have something like:</p>
  
  <pre><code>if ("${TEST_00}" == "true") { testTasksToRun.add(testsList[0]) }
  if ("${TEST_01}" == "true") { testTasksToRun.add(testsList[1]) }
  if ("${TEST_02}" == "true") { testTasksToRun.add(testsList[2]) }
  if ("${TEST_03}" == "true") { testTasksToRun.add(testsList[3]) }
  if ("${TEST_04}" == "true") { testTasksToRun.add(testsList[4]) }
  if ("${TEST_05}" == "true") { testTasksToRun.add(testsList[5]) }
  </code></pre>
  
  <p>But I would like to have something like:</p>
  
  <pre><code>for(int i=0; i&lt;testsList.size(); i++) {
      if ("${TEST_0${i}}" == "true") {
          testTasksToRun.add(testsList[i])
      }
  }
  </code></pre>
  
  <p>I tried to search for solutions and experimented on the GroovyConsole but didn't manage to get anything to work. Looks like it has something to do with "binding", but I am not familiar with that.</p>