each_item
- AbstractItem.each_item(function(item))
- Domain:
client
- Language:
javascript
- Class:
Description
Use each_item method to iterate over 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.
Parameter
Parameter |
Type |
Description |
|---|---|---|
|
|
Function to run for each child item (child itemis passed as a parameter) |
Example
The following code will output all catalogs of the project in a browser console:
function on_page_loaded(task) {
task.catalogs.each_item(function(item) {
console.log(item.item_name);
})
}