I have an API that will return x number of records. For instance it may return all book written by author x.
The response will contain the number of books returned, such as 4 book written by author x.
I want to be able to validate the same elements, such as publisher, for each book record returned.
Get all book written by X.
-> 4 books returned.
Loop throw return response for each book
- Check book 1 was published by Z
- Check book 1 was published by Y
- Check book 1 was published by X
- Check book 1 was published by W
I've written a script to do this but is there another way to handle this sort of situation that is faster than written it for each call?