# How to check whether Postman Response is matching the value from a set of data

**URL:** <https://community.postman.com/t/how-to-check-whether-postman-response-is-matching-the-value-from-a-set-of-data/21955>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [March 27, 2021, 4:07am UTC](https://community.postman.com/t/how-to-check-whether-postman-response-is-matching-the-value-from-a-set-of-data/21955 "2021-03-27T04:07:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitesh1505](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@amitesh1505](https://community.postman.com/u/amitesh1505)\
**Post date:** [March 27, 2021, 4:07am UTC](https://community.postman.com/t/how-to-check-whether-postman-response-is-matching-the-value-from-a-set-of-data/21955/1 "2021-03-27T04:07:37Z")

</div>

I have a field which only accepts data from below Set:  
[‘CRDTCD’,‘STDTID’,‘WRKID’,‘DLIC’,‘MLID’,‘UPAS’,‘RAID’]. Values other than these should not be processed. How can I check if the response is one of these values?

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [March 27, 2021, 9:09am UTC](https://community.postman.com/t/how-to-check-whether-postman-response-is-matching-the-value-from-a-set-of-data/21955/2 "2021-03-27T09:09:51Z")

</div>

Hello @amitesh1505 , you can use “to.be.oneOf” method, please refer this [post](https://community.postman.com/t/validate-a-parameter-value-that-is-present-in-a-list/13869/2) for more details 🙂

---

<div class="post-metadata">

**Author:** ![amitesh1505](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@amitesh1505](https://community.postman.com/u/amitesh1505)\
**Post date:** [April 1, 2021, 4:58pm UTC](https://community.postman.com/t/how-to-check-whether-postman-response-is-matching-the-value-from-a-set-of-data/21955/3 "2021-04-01T16:58:26Z")

</div>

Thank you. It worked for me.
