I have a response which I would like to validate in such a way that a particular attribute in this case capital may contain any of the following value {“BOM”, “DEL”, “BLR”}
Here is my example –
* def cityDetails =
"""
[
{
"state":"KA",
"capital":"BLR",
"population":"1M"
},
{
"state":"MH",
"capital":"BOM",
"population":"1.5M"
}
]
"""
When I used the following match statement –
* match each cityDetails[*].capital contains any ['BOM', 'DEL', 'BLR']
It does not give me the desired assertion. What possible mistake I may be making here? Please guide.