# \[How-to\] Check if a key/value pair exists in Object

**URL:** <https://forum.kirupa.com/t/how-to-check-if-a-key-value-pair-exists-in-object/229156>\
**Category:** flash\
**Created:** [June 14, 2007, 2:35pm UTC](https://forum.kirupa.com/t/how-to-check-if-a-key-value-pair-exists-in-object/229156 "2007-06-14T14:35:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![famffc](https://avatars.discourse-cdn.com/v4/letter/f/41988e/32.png) [@famffc](https://forum.kirupa.com/u/famffc)\
**Post date:** [June 14, 2007, 2:35pm UTC](https://forum.kirupa.com/t/how-to-check-if-a-key-value-pair-exists-in-object/229156/1 "2007-06-14T14:35:41Z")

</div>

For beginners, sometimes an easy thing is the hardest thing to look for in tutorials/documentation. They’re just too simple that most documentation will not cover it, or searching on google will give you bunch of rubbish results…

Anyway, I’ll cut the crap, here’s my question 😉

How to check if a key/value pair exists in associate array (Object) in AS3? In PHP you can do something like  
if (isset($foo[‘bar’])) echo “exist”;
