Documentation

each

executes a method for each element of an array

void each(function functor,object master);

Parameters

functorfunctionthe method that needs executing
masterobjectthe object that the method should be applied to

See also

Example

data.each(function(obj){  
    if (obj.status == "server")
        //statement 1
    else
        //statement 2

Details

In sample above method is applied to data array of data objects, each of which has status property and checks the value of this property.

Back to top