Reputation: 4859
This is my expected output:
[{name: 'ehsan'},{name: 'ali'},{name: 'mammad'}]
How to validate my output that matches a list of variable length of a json with this format?
Upvotes: 3
Views: 878
Reputation: 92
Assign that list to a variable and then use match each
def array = [{name: 'ehsan'},{name: 'ali'},{name: 'mammad'}]
Then match each array contains
"""
{
name : '#string'
}
"""
Upvotes: 3