You are not logged in.   Log in | Register

Collection object

From $1

Table of contents
  1. 1. Description
  2. 2. Member Methods

Description

This object represents a collection of other Gigya Socialize objects. It has member functions that perform operations on the entire collection or return individual items from it.

Member Methods

Method Name
Return Value Description
asArray() Array Returns the collection as an array of the contained objects.
each(function(item, index)) None

This function accepts a function reference as a parameter and calls that function on

each item in the collection. The called function receives one item from the collection

and the index of the item (zero based) as parameters.
For example, the following code will print each item in the collection col:

function print(item, index) {
    document.write("index="+index+" item="+item);
}
col.each(print);
getById(itemID) object Returns an item from the collection by its ID.
getSize() number Returns the number of items in the collection.

 

 

Tags:
Files (0)