Skip to content

KeyExistsQ

Status: Stable

documented, exercised by the test suite and/or worked examples, with no known limitations recorded.

Description

KeyExistsQ[assoc, key]

Gives True if key is present in assoc, else False.

Examples (2)

Every input below was run against the current Mathilda build and its output recorded.

Basic examples (2)

In[1]:= KeyExistsQ[<|"a" -> 1|>, "a"]
Out[1]= True

In[2]:= KeyFreeQ[<|"a" -> 1|>, "b"]
Out[2]= True

Implementation notes

Attributes: Protected.

References

See also: KeyMemberQ, KeyFreeQ