I have the following array
[["convertible", "2010", "red"], ["convertible", "2010", "green"]]
How do I merge the above array into this, in either in Rails or in Ruby?
["convertible", "2010", "red", "convertible", "2010", "green"]
Edit-1
@category.each do |content|
form_chain = JSON.parse(content.content)
chained_array << form_chain.values
end
chained_array
This gives the output
[["convertible", "2010", "red"], ["convertible", "2010", "green"]]
If I use chained_array.flatten! it gives the same result.