title: jenkins-pipeline readJSON - how to read key elements as a list
body: <p>I have trouble reading all keys "type-X.X" from JSON with readJSON</p>
  
  <p>oldJson string:</p>
  
  <pre><code>{
  "branch":{
      "type-0.2":{"version":"0.2","rc":"1","rel":"1","extras":"1"}}
      "type-0.3":{"version":"0.3","rc":"1","rel":"1","extras":"1"}}
  }
  </code></pre>
  
  <p>I try to access it as in example
  <a href="https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readjson-read-json-from-files-in-the-workspace" rel="nofollow noreferrer">https://jenkins.io/doc/pipeline/steps/pipeline-utility-steps/#readjson-read-json-from-files-in-the-workspace</a></p>
  
  <pre><code>def branchList = new JsonSlurper().parseText(oldJson['branch'])
  echo (branchList.keySet().toString())
  </code></pre>
  
  <p>but it fails:</p>
  
  <blockquote>
    <p>hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No
    signature of method: groovy.json.JsonSlurper.parseText() is applicable
    for argument types: (net.sf.json.JSONObject) values:</p>
  </blockquote>
  
  <p>I would like to get a list ["type-0.2", "type-0.3"]</p>