Reputation: 33795
So say I have a 2D array like this:
list = [["auburn", "http://auburn.craigslist.org"], ["birmingham", "http://bham.craigslist.org"], ["dothan", "http://dothan.craigslist.org"]]
I would like it to look like this:
list = [["auburn", "http://auburn.craigslist.org/web/"], ["birmingham", "http://bham.craigslist.org/web/"], ["dothan", "http://dothan.craigslist.org/web/"]]
So I have just modified the second element within each nested array.
How do I do that in Ruby?
Thanks.
Upvotes: 1
Views: 258