Ask a Question

How to validate the 1st character of a responce data set

SOLVED
chathurad
Contributor

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".

11-11-2018 1-03-56 PM.png

1 REPLY 1
chathurad
Contributor

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)

cancel
Showing results for 
Search instead for 
Did you mean: