executes a method for each element of an array
functor | function | the method that needs executing |
master | object | the object that the method should be applied to |
data.each(function(obj){
if (obj.status == "server")
//statement 1
else
//statement 2
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