Noob question here!
I have an array with hashes that looks like this:
arr = [{id: 1, name: "Pedro"},{id: 2, name: "Pablo"}]
and want to have an array like this:
ids = [1,2]
I looked into using map or select like this:
ids = arr.each.select{|k,v| "id"==k}
But I can't figure it out.