Keys

Keys[key1val1,key2val2,]
gives a list of the keys in an association.

Keys[{key1val1,key2val2,}]
gives a list of the in a list of rules.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Get the keys in an association:

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

Get keys from a list of rules:

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

Keys automatically threads over lists:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)