Assert Array of Objects contains key/value #126
-
|
Is there an easy way to assert that an array of objects contains just a specific key. Let's say I hav 8000 e an object like so: {
"username": "dhawanShikhar",
"question_pools": [
{
"pool_name": "draw_me",
"game_name": "drawlosseum",
},
{
"pool_name": "my_unique_pool2",
"game_name": "quibly",
}
]
}I want to check that at least one of the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi, I think the closest thing is using JSONPath + Array().Iter() + a loop, see this snippet for details: https://github.com/gavv/httpexpect#json-schema-and-json-path |
Beta Was this translation helpful? Give feedback.
-
|
thanks |
Beta Was this translation helpful? Give feedback.
Hi, I think the closest thing is using JSONPath + Array().Iter() + a loop, see this snippet for details: https://github.com/gavv/httpexpect#json-schema-and-json-path