title: Dynamic Variable in Jenkins Declarative Pipeline
body: <p>I have an environmental variable defined in my pipeline. I am trying to define a variable dynamically based on the variable defined in the <code>environment</code> block.</p>
  
  <pre><code>pipeline {
     agent any
     environment {
       field = 'customfield_123'
     }
     stages {
        steps {
          script {
  
       def details = new groovy.json.JsonSlurperClasssic().parseText(file)
       def data = details.fields."env.field".slipt()
       }
      }
     }
   }
  </code></pre>
  
  <p>How will this be possible? Is there a way to do this? </p>