I have converted an array to a string with str(). Is it possible to turn
Convert string to array
Sorry, accidentally clicked enter before I finished typing.
I have converted an array to a string with str(). Is it possible to turn the outputted string back into an array? The string looks like this: [-1, [2, 0, 0, 0, 5, 1], 1]
Is this possible? I still haven't found a way.
Does it have to be that exact string representation? If not, you could use to_json and parse_json functions
var json_string = to_json(my_array) var new_array = parse_json(json_string)
Thank you! This is exactly the kind of thing I was looking for.
2 years later
Megalomaniak added the Godot Help tag .