I'm dealing with a script that returns values as objects, which can be either text or numbers. For example, it could return 'hello, goodbye'
or '500, 900'
.
However, when attempting to use the split()
method on this object, I encounter an error:
TypeError: Object 'hello, goodbye' has no method 'split'
I really want to use the split method. Is there a way around this issue?
It seems like the only option is to convert the object into a string. How would one go about doing that?