EventItems Type

A collection of EventItem objects.

It is possible to retrieve a specific element by specifying its index in square brackets and obtain the number of elements in the collection with the method length. It is also possible to obtain the corresponding array with the method toArray.

Example of Use

var result = getEventsSync();

var eventItems = result.events;

var firstEvent = eventItems[0];

var eventsArray = eventItems.toArray();

eventsArray.forEach(

function(event)

{

console(event)

}

);

 

In the above example:

  • The object GetEventsResult is the result.
  • eventItems is an EventItems object
  • firstEvent is an EventItem object
  • eventsArray is an array of EventItem objects, on which it is possible to invoke all the methods that operate on arrays in JavaScript.