title: How to merge an array of arrays together into a single array?
body: <p>I have the following array</p>
  
  <pre><code>[["convertible", "2010", "red"], ["convertible", "2010", "green"]]
  </code></pre>
  
  <p>How do I merge the above array into this, in either in Rails or in Ruby?</p>
  
  <pre><code>["convertible", "2010", "red", "convertible", "2010", "green"]
  </code></pre>
  
  <p><strong>Edit-1</strong></p>
  
  <pre><code>@category.each do |content|
        form_chain = JSON.parse(content.content)
        chained_array &lt;&lt; form_chain.values
      end
  
      chained_array
  </code></pre>
  
  <p>This gives the output</p>
  
  <pre><code>[["convertible", "2010", "red"], ["convertible", "2010", "green"]]
  </code></pre>
  
  <p>If I use <code>chained_array.flatten!</code> it gives the same result.</p>