I am working on CFTree. I need to get all siblings on same depth for example in following figure I need an array of all 8 CFTreeRef on 3rd depth. How can I get that?

I am working on CFTree. I need to get all siblings on same depth for example in following figure I need an array of all 8 CFTreeRef on 3rd depth. How can I get that?

Following your depth numbering - i.e. starting with root at 1, not 0:
To make things a bit cleaner, you might wrap it in a helper function:
Then you can just call