If I have an array of strings in ruby and I want to get the resulting array, what is the best way of doing it?
array = ["string_apple", "string_banana", "string_orange"]
desired_result = [["string", "apple"], ["string", "banana"], ["string", "orange"]]
My current attempt:
array.map(|r| r.split("_"))