# Test should be pass if one of the values in the array matches the single value I get in response

**URL:** <https://community.postman.com/t/test-should-be-pass-if-one-of-the-values-in-the-array-matches-the-single-value-i-get-in-response/13265>\
**Category:** Help Hub\
**Tags:** tests, variables, collections\
**Created:** [June 10, 2020, 4:02pm UTC](https://community.postman.com/t/test-should-be-pass-if-one-of-the-values-in-the-array-matches-the-single-value-i-get-in-response/13265 "2020-06-10T16:02:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sero.barseghyan](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@sero.barseghyan](https://community.postman.com/u/sero.barseghyan)\
**Post date:** [June 10, 2020, 4:02pm UTC](https://community.postman.com/t/test-should-be-pass-if-one-of-the-values-in-the-array-matches-the-single-value-i-get-in-response/13265/1 "2020-06-10T16:02:09Z")

</div>

**This is my script:**

```
 pm.test("blendmode is correct" , function () {
  let arr = ['multiply', 'darken', 'light'],
    replayStickerObject = pm.response.json();
  arr.forEach((x) => {
    pm.expect(replayStickerObject.data.actions[2].added_objects[0].blendmode).to.be.oneOf([x]);
  }); 
});

```

**Requirement:** I need to verify if one of the values in the array matches the single value of the response.  
If one of **[‘multiply’, ‘darken’, ‘light’]** those 3 values matches the single value in response the test should be passed.

This is the response:

 ![Screenshot at Jun 09 13-25-53](https://us1.discourse-cdn.com/getpostman/original/3X/8/5/8570c3f37b96f05f30b3d3de490a1649e8d1f6af.png)

And here is the test result:

 ![4](https://us1.discourse-cdn.com/getpostman/original/3X/c/d/cd466392b24ce8199060c5cee1fdc70d81e347e6.png)  
Any solution to this?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [June 10, 2020, 4:04pm UTC](https://community.postman.com/t/test-should-be-pass-if-one-of-the-values-in-the-array-matches-the-single-value-i-get-in-response/13265/2 "2020-06-10T16:04:48Z")

</div>

I don’t think you need the entire forEach block.

Try something like:  
`pm.expect(replayStickerObject.data.actions[2].added_objects[0].blendmode).to.be.oneOf(arr);`
