I'd like to insert a hash into a specific location in an array. I have this:
arr = [
{:key1=>"one", :key2=>"two", :key3=>"three"},
{:key1=>"four", :key2=>"five", :key3=>"six"},
{:key1=>"seven", :key2=>"eight", :key3=>"nine"}
]
and would like to insert this hash into the array
{:key1=>"---", :key2=>"---", :key3=>"---"}
So that the result is
arr = [
{:key1=>"one", :key2=>"two", :key3=>"three"},
{:key1=>"---", :key2=>"---", :key3=>"---"},
{:key1=>"four", :key2=>"five", :key3=>"six"},
{:key1=>"seven", :key2=>"eight", :key3=>"nine"}
]
Can anyone help please