I have a JSON
file which I am reading in Karate
feature file which consists of IDs, something like below temp.json
{
112354,
221344,
126789,
122333
}
In my Karate feature file, I am calling an API that returns all the IDs available in the DB. The response of this is complex json arrays
. To retrieve one ID from the response I have to do something like below
company[0].department[0].project[0].id
response json structure
{
"company": [
{
"department": [
{
"project": [
{
"id": 567436
},
{
"id": 123456
}
]
}
]
}
]
}
now I want to match if all the IDs in temp.json are available in the json
response I got from Karate by calling the API. It has to traverse through all the arrays to see if the IDs are available. Is there any way to accomplish this in Karate ?