Check if array response has null

Hi Team,
I have json response mentioned below

1)My checkpoint is that if any regions of them has eventcount >10
2)Check if location is coming null in any response

[
{
“name”: “LAVERTON”,
“location”: “POINT (123.796461 -27.766256)”,
“eventCounts”: “0”
},
{
“name”: “PLANTAGENET”,
“location”: “POINT (117.643484 -34.58469)”,
“eventCounts”: “0”
},
{
“name”: “CUBALLING”,
“location”: “POINT (117.079408 -32.733775)”,
“eventCounts”: “0”
},
{
“name”: “HALLS CREEK”,
“location”: “POINT (127.978458 -18.819863)”,
“eventCounts”: “0”
},
{
“name”: “MORAWA”,
“location”: “POINT (115.9468 -29.064497)”,
“eventCounts”: “0”
},
{
“name”: “CAMBRIDGE”,
“location”: “POINT (115.787103 -31.934175)”,
“eventCounts”: “0”
},
{
“name”: “COOLGARDIE”,
“location”: “POINT (120.52791 -30.966649)”,
“eventCounts”: “0”
},
{
“name”: “JERRAMUNGUP”,
“location”: “POINT (119.232078 -34.102312)”,
“eventCounts”: “0”
}]

hello,
try to look and implement this library … it’s best to check json structure and even if values are in range
https://json-schema.org/draft/2019-09/json-schema-core.html
https://json-schema.org/draft/2019-09/json-schema-validation.html

@Andrej_Podhajsky: I need a validation check if atleast 10 name has eventcount>10

in that case easiest way is to parse it with JsonSlurper and then use cycle with to check attribute of each object.

https://www.tutorialspoint.com/groovy/groovy_json.htm