collect

Recurses through a tree, collecting each element in that tree and returning it in an array. The value of getKey should be a field that contains a list of the same type of object. Accepts an optional depth argument which will limit the traversal. This should be used for trees with circular references.

Graycore, LLC © 2018 - 2024. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.