eachLeaf

iterates through the leaves (items with no sub-items) of the specified branch

void eachLeaf(string pid,function code);

Parameters

pidstringthe parent (branch) id
codefunctiona function that needs calling for each data item

Example

tree.data.eachlLeaf("1.2",function(obj){ console.log(obj.id)});

Back to top