Solved
Forum Discussion
This script will work for the sample provided and can be easily adapted.
// get test response as json
def json = new groovy.json.JsonSlurper().parseText(context.response)
// build array of the result list, specifically the proceduresId element
def array = json.result.list.proceduresId;
// a quick test if an array is sorted is to compare it to its sorted self.
// FALSE means make a copy of the array and sort it, instead of sorting the original object
assert (array == array.sort(false));
harshabongle
5 years agoOccasional Contributor
Thanks a lot groovyguy ..it's working