Convert an array of arrays to an array of strings

I currently have an array of arrays. My shared array has 10 arrays with one element.

[["http://instagr.am/r/123"], ["http://instagr.am/r/456"] ....]

My goal is to clear this so that it is an array of strings.

Example:

[http://instagr.am/r/123, http://instagr.am/r/456 , ...]

I am trying to find Google to solve this problem, but I seem to be unable to find it, and I was hoping that you kind people could help the emerging hacker.

+5
source share
2 answers

Array#flatten

[["http://instagr.am/r/123"],["http://instagr.am/r/456"]....].flatten
+18
source
array.map(&:first)

...............

+2
source

All Articles