> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/orderedmap.md).

# OrderedMap

The **OrderedMap** object is an [associative container](http://en.wikipedia.org/wiki/Associative_container) and is identical to the [**Map**](/directory-opus/manual/reference/scripting_reference/scripting_objects/map.md) 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**](/directory-opus/manual/reference/scripting_reference/scripting_objects/dopusfactory.md)**.OrderedMap** method. All Opus script methods documented as accepting a **Map** object can also accept an **OrderedMap**.

See the documentation of the [**Map**](/directory-opus/manual/reference/scripting_reference/scripting_objects/map.md) object for more information.
