I request the help of this community on how to properly convert a string into an array, A bunch of confusing code that ultimately returns a variable named team from the server, inside this team variable is the value:
"[9, 27, 32, 112, 4]"
I need this turned into the array
[9, 27, 32, 112, 4]
I've tried the following:
aTeam = team.tr('[]', '')
vTeam = aTeam.split
did not work, Ruby must have inherently included quotes or something.
Any help would be greatly appreciated
"[9, 27, 32, 112, 4]"
I need this turned into the array
[9, 27, 32, 112, 4]
I've tried the following:
aTeam = team.tr('[]', '')
vTeam = aTeam.split
did not work, Ruby must have inherently included quotes or something.
Any help would be greatly appreciated
Last edited by a moderator: