I have strings in an array:
["foo","bar","foo"bar"baz"]
I am using eval method to form an array with this string, but the inner double quotes are not escaped:
eval('["foo","bar","foo"bar"baz"]') # => SyntaxError
Is there a way to escape only the ones inside an array element?
["foo","bar","foo\"bar\"baz"]