Пробовал приведенный ниже код, чтобы проверить, присутствует ли определенная схема в обоих массивах, не работает.
* def schema = {"category": "reference","author": "Nigel Rees","title": "Sayings of the Century", "price": 8.95}
* def bookdetails= $api.store.book[*]
* match bookdetails contains schema
Json:
{
"store": {
"book": [
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
}],
[{
"category": "fiction",
"author": "Evelyn Waugh",
"title": "Sword of Honour",
"price": 12.99
},
{
"category": "reference",
"author": "Nigel Rees",
"title": "Sayings of the Century",
"price": 8.95
}]}}