Ask a Question

Check for empty value in groovyscript

SOLVED
Hellotest
Contributor

Check for empty value in groovyscript

In Groovy script in Ready API , trying to extract a value from Response and based on it if it null or not, need to write next few steps.

But value which is returning is [].

Then if I check with null or "" it does not work .

How do I check if value is [].

Please suggest

1 REPLY 1
nmrao
Community Hero

You are getting JSON Array in response with no elements in ti.

So, you can check the size is zero or not.



Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: