initializeTreeArray(items : array,
<keyField> : string,
<parentKeyField> : string,
<nameForChildrenIfWillBeReferenced> : string? default "children",
<nameForParentIfWillBeReferenced> : string? default null);
Returns an array such that:
[
...,
{
...One of those items which does not have any parent.
<nameForChildrenIfWillBeReferenced>: Array of items which have such keyField value is equal to parentKeyField value of this item.
<nameForParentIfWillBeReferenced>: Reference to the parent item which this item belong to children array.
}
...,
]