How to validate the 1st character of a responce data set
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2018
11:36 PM
11-10-2018
11:36 PM
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".
Solved! Go to Solution.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2018
11:48 PM
11-10-2018
11:48 PM
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)
