Unable to get subfolder ids

Hi,
How do I get subfolder’s ids of partcular selected folder.

Thanks,

I’m assuming that you’re talking about data in a Tree.

The only way I know of is to use Tree.getFirstChildId and Tree.getNextSiblingId. If you need the IDs as an array, you can create a function like the following to iterate the tree data and store the result in an array.

function getChildIds(tree, parent) {
    var result = [],
        child = tree.getFirstChildId(parent); // Get the first child

    // Iterate until there are no children left
    while (child) {
        result.push(child); // Add the child to the array
        child = tree.getNextChildId(child); // Get the next child
    }
    return result;
}