title: Cannot access params map using Groovy
body: <p>I want little help which I suspect is due to my lack of understanding for Groovy syntax. So, here's the thing:</p>
  
  <p>On the GSP page I want to set a field's value from the params map which is </p>
  
  <pre><code> ["id":"107901", "Field_10.value":"2", "Field_10":["value":"2"],"Field_11.value":"", "Field_11":["value":""],action:'abc']
  </code></pre>
  
  <p>On the gsp page, I want to find the value against the key Field_{some-id}.value</p>
  
  <p>So I am calling a tag like,    <code>g.testTag(id:field.id)</code>  with its implementation as    </p>
  
  <pre><code>def testTag = { attrs,body-&gt;
  
      println "params are ${params}"
      def result = ""
      def keyRequired = "Field_${attrs.id}.value"
      println "keyRequired &gt;&gt;&gt;&gt;&gt; ${keyRequired.toString()}"
      params.each { key,value-&gt;
          println "key is ${key}"
          println "Value is ${value}"
          if (key.equals(keyRequired.toString())) {
              result = params.value
          }
      }
      println "Final result is &gt;&gt;&gt;&gt;&gt;&gt; ${result}"
  }
  </code></pre>
  
  <p>The value passed in id is 10 and with my params printed as above, I was expecting a value 
  of 2 which is corresponding to the key in the params to show up. But apparently I see the 
  result as null..</p>
  
  <p>What am I doing wrong ? Can anyone help please...</p>
  
  <p>Thanks   </p>