eachLeaf

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

void eachLeaf(string pid,function code);
pidstringthe parent (branch) id
codefunctiona function that needs calling for each data item

Example

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

Back to top