getIndexById

returns the index of the item with the specified id

number getIndexById(id id);

Parameters

ididthe item id

Returns

numberthe item's index
Details

If the id is not found, the method returns -1

With tree-like structures, use the getBranchIndex method.

See also
Back to top