How to verify Array in Api Resful

I have no idea to create script for check response object message api below :frowning:

I tried use :
WS.verifyElementPropertyValue(response, ‘message’, ‘Sorry we can not find events that you want!!’) but not working

and i use below command to check string in response :
assert response.getResponseText().contains(‘Sorry we can not find events that you want!!’) it worked
But I want to check this

“message”: [

        "Sorry we can not find events that you want!!"

    \]

Screen Shot 2018-01-31 at 8.14.58 PM.png

Hi,
could you try following solution?

def jsonSlurper = new JsonSlurper()

def res = jsonSlurper.parseText(response.getResponseText())

println(res.errors.message[0])

Trong Bui said:

Hi,
could you try following solution?

def jsonSlurper = new JsonSlurper()

def res = jsonSlurper.parseText(response.getResponseText())

println(res.errors.message[0])

Thank you. It’s worked for me :smiley: