Let\'s say I had the string
\"[1,2,[3,4,[5,6]],7]\"
How would I parse that into the array
[1,2,[3,4,[5,6]],7]
The same can be done using Ruby standard libaray YAML as below :
require 'yaml' s = "[1,2,[3,4,[5,6]],7]" YAML.load(s) # => [1, 2, [3, 4, [5, 6]], 7]