# Test Array for Object

**URL:** <https://community.postman.com/t/test-array-for-object/12632>\
**Category:** Help Hub\
**Tags:** tests, setnextrequest, collection-runner\
**Created:** [May 13, 2020, 10:21pm UTC](https://community.postman.com/t/test-array-for-object/12632 "2020-05-13T22:21:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hannah.neil](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/hannah.neil/32/4477_2.png) [@hannah.neil](https://community.postman.com/u/hannah.neil)\
**Post date:** [May 15, 2020, 9:10pm UTC](https://community.postman.com/t/test-array-for-object/12632/3 "2020-05-15T21:10:39Z")

</div>

Hi @austin4778, does this post help answer your question?

> [@How to check that each objects from response contains particular key?](https://community.postman.com/t/how-to-check-that-each-objects-from-response-contains-particular-key/3788/2):
>
> To validate the Json format and contents I recommend you to use the AJV library, it has powerful features to validate Json response contents. The following code might solve your problem. pm.test(“Response contains property”,function() { var Ajv = require(‘ajv’); var ajv = new Ajv(); // options can be passed, e.g. {allErrors: true} //Json schema to be validated var schema = { “type”: “array”, “items”: { “type” : “object”, “required”: [“Id”] } }; var jsonData = pm.response.json(); var jsonV…

---

_[View the full topic](https://community.postman.com/t/test-array-for-object/12632)._
