# OrderedMap

The **OrderedMap** object is an [associative container](http://en.wikipedia.org/wiki/Associative_container) and is identical to the [**Map**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/map) object except for the ordering of items within the map.

Whereas the regular **Map** object sorts items alphabetically by key, the **OrderedMap** preserves the order that items are added.

You can create a new **OrderedMap** using the [**DOpusFactory**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/dopusfactory)**.OrderedMap** method. All Opus script methods documented as accepting a **Map** object can also accept an **OrderedMap**.

See the documentation of the [**Map**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/map) object for more information.
