Traditional Caché Objectscript has the multi-dimensional array as its main form of complex data structure and the $order
command as the main means of traversing said data structures. But newer versions of Caché ObjectScript also have data structures that are direct parallels of what languages such as JavaScript provide, in the form of %DynamicObject
and %DynamicArray
. These have an easy to use iterator feature via the %GetIterator
method, and even a handy built-in literal syntax for constructing new objects.