I have a string looks like an array "[12,34,35,231]" But this is just a string contains square brackets at the begin and the end of it.
I need to separate strings looks like arrays and others.
To do this I want to convert a string to an array '12','34','35','231' and after conversion use it with the condition like this:
if array.is_a? Array
...
else
...
end
Could enybody tell me how to do that conversion in the right way?
string[1..-2].split(',')