# Find item in array by specific properties

**URL:** <https://community.postman.com/t/find-item-in-array-by-specific-properties/56250>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [January 5, 2024, 11:53pm UTC](https://community.postman.com/t/find-item-in-array-by-specific-properties/56250 "2024-01-05T23:53:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 6, 2024, 10:34am UTC](https://community.postman.com/t/find-item-in-array-by-specific-properties/56250/2 "2024-01-06T10:34:17Z")

</div>

Hey @ignleotta 👋

Welcome to the Postman community! :postman:

These type of questions are quite common and fall more on the JavaScript side than being a specific Postman problem.

It’s always good to do a search across the forum first to check for similar questions.

Here’s on response I gave a while back the you can use here:

> [@Find the right object in array and assert on it](https://community.postman.com/t/find-the-right-object-in-array-and-assert-on-it/34244/2):
>
> You could use something like: let obj = pm.response.json().users.find(e =\> e.name === 'Julius'); console.log(obj.pet); You could use that function inside a test and expect against obj.pet to equal iguana. For example: pm.test('Name of pet matches', () =\> { let obj = pm.response.json().users.find(e =\> e.name === 'Julius'); pm.expect(obj.pet).to.eql('iguana'); });

You would need to change the references to your context but it will work the same. Give it a go first and then come back if you have any issues.

---

_[View the full topic](https://community.postman.com/t/find-item-in-array-by-specific-properties/56250)._
