title: How to get the maximum value of list in groovy?
body: <p>Tried this code but it wont return the expected output. The list that i have doesnt have single quote.</p>
  <pre><code>def curlCmd = sh(script: &quot;&lt;some curl cmd POST&gt;&quot;, returnStdout:true).trim()
  def parsedResponse = readJSON text: curlCmd
  def response = parsedResponse['fruit']
  // Output of response is [apple123, apple124, apple125]
  def maxValue = response.max() 
  
  echo &quot;maxValue: ${maxValue}&quot;
  </code></pre>
  <p>Actual Output:</p>
  <pre><code>maxValue: []
  </code></pre>
  <p>Expected Output:</p>
  <pre><code>maxValue: [apple125]
  </code></pre>