KeySort

KeySort[assoc]
orders the elements of an association by sorting its keys.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Sort the elements in an association by their keys:

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

Sort a list of rules:

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