=========
each_item
=========

.. js:function:: each_item(function(item))

**domain**: client 

**language**: javascript

**class** :doc:`AbstractItem </refs/client/abstractitem_api>`

Description
===========

Use each_item method to iterate over :doc:`items <at_items>` owned by this object.

The each_item() method specifies a function to run for each child item (child item
is passed as a parameter).

You can break the each_item loop at a particular iteration by making the callback 
function return false. 

Example
=======

The following code will output all catalogs of the project in a browser console:

.. code-block:: js

    function on_page_loaded(task) {
        task.catalogs.each_item(function(item) {
            console.log(item.item_name);
        })
    }
    

