Given I have this JSON array:
{
value: ["000", "111", "345", "987"]
}
I want to use Rest-assured to validate the format of the fields using it's given/when/then structure.
given().
queryParam("myparam", myparamvalue).
when().
get(callRoot).
then().
body("value", matchesPattern("[0-9][0-9][0-9]");
How do I get Rest-assured to loop through and apply the test against each value in the JSON array?
I don't know how many values will be in the JSON array. It might be only 1; it might be 100.