Forum Discussion

Readyapiuser's avatar
Occasional Contributor
9 years ago

Groovy Script assertion count



Can someone please guide me how to use count in groovy script assertion?


My response is as below:


I want to count occurrence of text "name", "lastName" etc from below response. I want to include it in script assertion and can not use json count match. 


"created": {
"event": [{
"name": "Joe",
"lastName": "Matt"
"notcreaed": {
"event": []