Convert array to string with quotes
ruby
Solution
Try:
array.map{|s| "\"#{s}\""}.join(', ')
Update:
With structure `[['a'],['b']` do:
array.map{|s| "\"#{s.first}\""}.join(', ')
Problem
How do I convert an array like: ``` [["hello"], ["world"]] ``` To: ``` "hello", "world" ``` I tried `array.join(',')` But this would return: ``` "hello world" ``` What I want is a string with qoutes: `""hello", "world""`. For completeness: I am trying to build this query from the array. ``` DELETE FROM table WHERE column IN ("hello", "world"); ```