title: No such field found: field java.lang.String sinput error while running my jenkinsfile
body: <p>Getting <code>No such field found: field java.lang.String sinput</code> error while running my Jenkinsfile.</p>
  <p>I have developed a Jenkinsfile that would take a user input and further would run a command on remote machine taking the user input as a variable</p>
  <pre><code>stages {
      stage(&quot;Interactive_Input&quot;) {
          steps {
              script {
                  def apiinput
                  def userInput = input(
                          id: 'userInput', message: 'This is my project',
                          parameters: [
                                  string(defaultValue: 'None',
                                          description: 'Enter the name of the service',
                                          name: 'sinput'),
                                  
                          ])
                  // Save to variables. Default to empty string if not found.
                  apiinput = userInput.sinput?:''
              }
          }
      }
  }
  </code></pre>