chathurad
7 years agoContributor
How to validate the 1st character of a responce data set
In my resonce i have to check the responce text is starting with letter "D"
Is there any way to do this.So far i have able to get the entire 1st responce,But my gall is to validate whether the 1st responce text is starting with letter "D".
I was able to do this by:
def slurper = new JsonSlurper()
def json = slurper.parseText response
String countryList = json.result.values[0]
def aa =countryList.take(1)