Model:getNodeSibling

Edit

Returns the next sibling of a node (a node with the same parent), or nil if the node doesn't have a sibling.

This, together with Model:getNodeChild, can be used to iterate the tree of nodes in a Model.

sibling = Model:getNodeSibling(node)

Arguments

NameTypeDescription
nodestring | number The name or index of a node.

Returns

NameTypeDescription
siblingnumber | nil The index of the node's next sibling, or nil if the node doesn't have a sibling.

See also