Object built-in object

ObjectIterator

Iterator object for traversing collection data

inheritance relationship

Operator

@iterator

Query the iterator of the current object element

1
Iterator Iterator.@iterator();

Return results:

  • Iterator, returns an iterator of the current object elements

member function

next

Iterate over the next element

1
(Value value, Boolean done) Iterator.next();

Return results:

  • (Value value, Boolean done), returns the next element, or marks the end of the iteration

toString

Returns the string representation of the object. Generally, "[Native Object]" is returned. The object can be re-implemented according to its own characteristics.

1
String Iterator.toString();

Return results:

  • String, returns the string representation of the object

toJSON

Returns a JSON format representation of the object, generally returning a collection of readable properties defined by the object.

1
Value Iterator.toJSON(String key = "");

Call parameters:

  • key: String, not used

Return results:

  • Value, returns a value containing JSON serializable