# Pastebin kJhyvzbJ class Array def to_proc ->(receiver, *args) { receiver.public_send(*self, *args) } end end data = [{'x'=>1}, {'x'=>2},{'x'=>'foo'}] data.map(&[:[], 'x']) # => [1, 2, "foo"]