Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)
BUILT-IN WOLFRAM LANGUAGE SYMBOL

AssociationQ

AssociationQ[expr]
gives True if expr is a valid Association object, and False otherwise.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Association constructed from rules yields a valid object:

In[1]:=
Click for copyable input
Out[1]=

Valid Association object allows extraction of values given keys:

In[2]:=
Click for copyable input
Out[2]=

If arguments are not rules, Association remains unevaluated:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Association that is not valid has no special properties:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2015
(10.1)