KeyMemberQ[assoc,form]
yields True if a key in the association assoc matches form, and False otherwise.
KeyMemberQ[form]
represents an operator form of KeyMemberQ that can be applied to an expression.
KeyMemberQ
KeyMemberQ[assoc,form]
yields True if a key in the association assoc matches form, and False otherwise.
KeyMemberQ[form]
represents an operator form of KeyMemberQ that can be applied to an expression.
Examples
Basic Examples (4)
Test whether "x" is a key in the association:
Test whether the association contains a string key:
KeyMemberQ works with lists of rules:
Determine which of the associations does not contain the key:
Related Guides
History
Text
Wolfram Research (2015), KeyMemberQ, Wolfram Language function, https://reference.wolfram.com/language/ref/KeyMemberQ.html.
CMS
Wolfram Language. 2015. "KeyMemberQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KeyMemberQ.html.
APA
Wolfram Language. (2015). KeyMemberQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KeyMemberQ.html
BibTeX
@misc{reference.wolfram_2025_keymemberq, author="Wolfram Research", title="{KeyMemberQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyMemberQ.html}", note=[Accessed: 16-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_keymemberq, organization={Wolfram Research}, title={KeyMemberQ}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyMemberQ.html}, note=[Accessed: 16-August-2025]}