Skip to main content
%GetNext()

This is a method of the %Iterator object returned by %GetIterator(). It advances the iterator and returns true if the iterator is positioned on a valid element, false if it is beyond the last element. The key and value arguments return values for a valid element at the current iterator position. The optional type argument returns the original type of value. See “Iterating over a Dynamic Entity with %GetNext()” for details and examples.

   method getNext(Output key, Output value, Output type...) as %Integer

parameters:

  • key — returns the object key or array index of the element at the current position

  • value — returns the value of the element at the current position.

  • type — (optional) returns a string containing a %GetTypeOf() return value representing the original type of value. When this third argument variable is present it changes some of the conversion rules for converting the element into an ObjectScript value (see %Iterator.Object.%GetNext()Opens in a new tab and %Iterator.Array.%GetNext()Opens in a new tab for detailed conversion rules).

see also: %GetIterator()

class reference: %Iterator.Object.%GetNext()Opens in a new tab and %Iterator.Array.%GetNext()Opens in a new tab


FeedbackOpens in a new tab