KeyFreeQ
Examples
Basic Examples (4)
Test whether "foo" is a key in the association:
KeyFreeQ[<|"x" -> 1|>, "x"]Test whether the association contains a string key:
KeyFreeQ[<|"x" -> 1|>, _String]KeyFreeQ works with lists of rules:
KeyFreeQ[{a -> 1, b -> 2}, a]Determine which of the associations does not contain the key:
KeyFreeQ[a] /@ {<|a -> 1|>, <|b -> 2|>}See Also
Related Guides
History
Text
Wolfram Research (2015), KeyFreeQ, Wolfram Language function, https://reference.wolfram.com/language/ref/KeyFreeQ.html.
CMS
Wolfram Language. 2015. "KeyFreeQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/KeyFreeQ.html.
APA
Wolfram Language. (2015). KeyFreeQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KeyFreeQ.html
BibTeX
@misc{reference.wolfram_2026_keyfreeq, author="Wolfram Research", title="{KeyFreeQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyFreeQ.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_keyfreeq, organization={Wolfram Research}, title={KeyFreeQ}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyFreeQ.html}, note=[Accessed: 12-June-2026]}