I have an array like this:
["b3", "a3", "a5", "b2"]
and I need to get it to this:
[["b3", "b2"] ["a3", "a5"]]
I have tried various things including:
["b3", "a3", "a5", "b2"].map { |i| i.include? 'a' }
# => returns [false, true, true, false]
["b3", "a3", "a5", "b2"].detect { |i| i.include? 'a' }
# returns "a3"
Is there an simple way for this to be done?
Thanks