How to refine array

Godot Version

v4.2.1.stable.official [b09f793f5]


Hello, to everyone.

My array currently is like [blueberry:<VBoxContainer#39124469439>, cinnamon:<VBoxContainer#39342573260>], how can I refine this so it returns [blueberry, cinnamon]?
it is a array from get_children: Array = $".".get_children()


[blueberry:<VBoxContainer#39124469439>, cinnamon:<VBoxContainer#39342573260>]

Those are just the String representation of those nodes. You have them already in your array.

1 Like

Thank you for your reply, yes that seems to be the truth
turns out that my find function was wrong instead.
I tried to find from the array as var args = slots.find(item,0) but the correct (worked way) way is:

	for node in slots:
		if( == item):

A more complete answer to this, even tho it may not be exactly what you want:
You can override the _to_string() method of any class you make to make it return whatever you want to be the textual representation of that object when it is printed out to the console.