title: Need help to read a json file using groovy and Jenkins
body: <p>I am facing some issues reading a JSON file.
  I am using Jenkins Active Choice Parameter to read value from a JSON file via groovy script. This is how my JSON file look.</p>
  
  <pre><code>{
    "smoke": "Test1.js",
    "default": "Test2.js"
  }
  </code></pre>
  
  <p>I want my groovy script to print out smoke and default. Below is what my groovy code look like.</p>
  
  <pre><code>import groovy.json.JsonSlurper
  def inputFile = new File(".\TestSuitesJ.json")
  def InputJSON = new JsonSlurper().parseText(inputFile)
  InputJson.each
  {
  return[
  key
  ]
  }
  </code></pre>
  
  <p>Above code is not working for me. Can someone please suggest a better groovy way?</p>