title: ruby using the "&:methodname" shortcut from array.map(&:methodname) for hash key strings rather than methodname
body: <p>Most ruby developers know how to save a few keystrokes by doing something like this:</p>
  <pre><code>array.map(&amp;:methodname)
  </code></pre>
  <p>rather than</p>
  <pre><code>array.map {|x| x.methodname }
  </code></pre>
  <p>Is there any way I could apply a similar &amp;:methodname shortcut for calling &quot;methods&quot; (values called via keys) on an array of hashes?</p>
  <p>In my case its with JSON api results being returned in batches of 60 as arrays of hashes originating from JSON. I tried to do this:</p>
  <pre><code>array.map(&amp;:&quot;keyname&quot;)
  </code></pre>
  <p>but was not successful, throwing a NoMethodError and saying that there's no 'keyname' method for Hash, which is reasonable I guess. I'm wondering if there is some magic bullet to emulating this <code>&amp;:...</code> shortcut for hashes that the ruby guys have already worked out.</p>
  <p>Here's one of the actual JSON responses, limited to 5 results I think</p>
  <pre><code>[{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.723008,&quot;lng&quot;:-78.930593}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/bowling-71.png&quot;,&quot;id&quot;:&quot;095e108208879fe989f2b36e81e38bafe0c17574&quot;,&quot;name&quot;:&quot;Waccamaw Bowling Center&quot;,&quot;opening_hours&quot;:{&quot;open_now&quot;:true},&quot;photos&quot;:[{&quot;height&quot;:612,&quot;html_attributions&quot;:[&quot;\u003Ca href=\&quot;https://plus.google.com/106701205257534874835\&quot;\u003EAndy Badi\u003C/a\u003E&quot;],&quot;photo_reference&quot;:&quot;CoQBeQAAANZ3d4xBep-4jlCnHp0IcCfSr4k6WVnAMDkPNPhlhSTaZ-NICdLaPVxaRW04qK8ko8x5SDScTeImNKWo2qlyF0JYTQpy-elxdZkx58BYQsjCLdtOaBr_yIoKk3NSuBGk7RS9Lf2IWpW0NaBjeAcPTNdKKHoTt_PZ4212cD67wV0jEhBmRx62d9nUyBmPkrv51nadGhTXEhV-hA5frdzGKal4tEd2pYPtjQ&quot;,&quot;width&quot;:816}],&quot;rating&quot;:3.1,&quot;reference&quot;:&quot;CoQBeAAAAD5d1gIGf4AG427DlKp-AC74Wt5ZCTd6uPU0-31qTnDRW3mBk4Scq00zjaLpbXnqvs1rlMgEFHPVId9nPGU5oaWr2nYRqRodz5LGdVpZqHx1R_PRciZX7xb068t6c7bqw7Fy_Bs9YIi8pCNdfAdHEZb8Pjxy1mpnL1qN_DBz243eEhCrzUmU34savXzZijjlv8TzGhSX3SofvWtuGYOhhPol9atp3aTSyQ&quot;,&quot;types&quot;:[&quot;bowling_alley&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;101 Philip Gray Drive, Myrtle Beach&quot;},{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.817622,&quot;lng&quot;:-78.692496}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/bowling-71.png&quot;,&quot;id&quot;:&quot;12fed6fbc66c7d9fc693fe37e6834e32ee6e23b9&quot;,&quot;name&quot;:&quot;North Myrtle Beach Bowling Center&quot;,&quot;photos&quot;:[{&quot;height&quot;:460,&quot;html_attributions&quot;:[&quot;\u003Ca href=\&quot;https://plus.google.com/100443525307746960711\&quot;\u003EHolly Heniford\u003C/a\u003E&quot;],&quot;photo_reference&quot;:&quot;CpQBhwAAADY5u5bWSEVGRZr1A7LR0Dpli5EEDRvOt5oWvzQYCOvRk1XO9bMBPdKvQYy_TwSHDcRRcqo6JZoGyLc-nLvlOoG1gX133KkdJ7lKU33RC9hdeN_dzfAUoxIrArZK8Ssu2QQWpXmq10xsJKPIu2bAzpS3n3vKqLdeKZY86GPw7LR0cM-Su3P0MZiY2AkC7uIJIhIQkQVG3s7We7yNPlqRqBkE4xoULTYXh2O6PPuki5_TXG3tN1O3kLg&quot;,&quot;width&quot;:816}],&quot;reference&quot;:&quot;CpQBgwAAAB0eZVssHlDn56UET5IqUpZygTzWdLclQ73lU0xzgNG875YyQPhQWGvOI2ciZq_BO6yZYzjMIdGEFVI-jnOhj_Y56Eq0T1MaLAL0dIkCM9qS4QwjAv3-TjwJOMBnN7aARHr3BuGqYLQZb5fkN3veUr2tWLKDZcPT1SHXRLypDutO5msurlQLub5YgmNhOomPdxIQLbIFLMxiqssFIUbO6bEcrRoU0A49j-VRMk4vHsSqxADOq5OPo1o&quot;,&quot;types&quot;:[&quot;bowling_alley&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;1105 Highway 17S, North Myrtle Bch&quot;},{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.617718,&quot;lng&quot;:-78.976797}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/bowling-71.png&quot;,&quot;id&quot;:&quot;5b2bcc16481ea7519f5e2858d4aa8af1b836f3c8&quot;,&quot;name&quot;:&quot;Surfside Bowling Center&quot;,&quot;rating&quot;:4.4,&quot;reference&quot;:&quot;CoQBeQAAACW_aubzCjtG19Nw9Pm9RIXpzpgXD5rFyKziCYy0Uc7X9g1vVz2YWoDUmXwIYA9uUksSArTypwe8lh76TjYYTnNIPiTXc_dpgw94XGaQwC1dO5DuMBPLtWyKgY4Jqa8UlYdHnTOe4FPJnZV7gTsx25Eid2iasa07gruGui6tltYtEhBpBraa9i7GzEE3FUYWxUU0GhSsfU66SAn8tpT3Oa_PRkTUYLXlCQ&quot;,&quot;types&quot;:[&quot;bowling_alley&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;510 U.S. 17 Business, Surfside Beach&quot;},{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.580683,&quot;lng&quot;:-79.024837}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/bowling-71.png&quot;,&quot;id&quot;:&quot;259104d58ff8e1aebe70db6149c74c736500a069&quot;,&quot;name&quot;:&quot;Frank Theatres&quot;,&quot;opening_hours&quot;:{&quot;open_now&quot;:true},&quot;photos&quot;:[{&quot;height&quot;:400,&quot;html_attributions&quot;:[],&quot;photo_reference&quot;:&quot;CnRnAAAAq26m02SGow16WCPVIvqioB646tx-kq39g-KPZ6rydR4gUFS2eFF_M3f0-ntrLiq-Iv3jjiQfUdVt_qMxYSAxxOxhfW9JucBG9-Z4ddJH-teNg6p62rHu5Ebbxs-CI40xoK78w3rdLbYA6GsWaOL5gRIQ5UBFXus-gXSy1UrWQ_aiixoUFE0H2eqxYpFyzbGkQtbq4nUHgUk&quot;,&quot;width&quot;:300}],&quot;reference&quot;:&quot;CnRvAAAAMDm7HoTk9pG-nKJGvzl9QIw6Qhso44Nh5Q0-xOwM5rykjQ12DJiF_2vZRMaUk9bOtNJwW9ntoBpTgj6bHtWiVCP3OlMu-gd0dgMygMvrIxGTkaR3cTKab0KuHHnoCFxdVB7esI-rK0v585lWS6xTZxIQ0gFfzO3vhZGkIjF6ThDgNBoUAYAMJyjC7f__SBcqOLKbDl3pFSQ&quot;,&quot;types&quot;:[&quot;bowling_alley&quot;,&quot;restaurant&quot;,&quot;food&quot;,&quot;movie_theater&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;10125 Frontage Road #12f, Murrells Inlet&quot;},{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.959856,&quot;lng&quot;:-78.400399}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/bowling-71.png&quot;,&quot;id&quot;:&quot;39a632e654125e6aa73a526579cae55cc14ee4a2&quot;,&quot;name&quot;:&quot;Brunswick County Bowling Center&quot;,&quot;reference&quot;:&quot;CoQBgAAAAETfTwuwFT34ynta7FJFME2kBVM0XurlJJKj3IQMaOXlWqTGU2P2L4l3gX9XP3XkGSgbxsQiOxIpGiTkrKRVV_-EzvGMNeE8IpsmSUMY7SBY-w7SlC6DGtlX1Py-YES6ZSTrM36my9f6Y2s7bAqamlvXbdtGfTgJpycuI0cx28fvEhB7Y-gtYgRCIInlgHxli4ygGhQlgaJt7d4PylH0KJBnzjRJeIKbNA&quot;,&quot;types&quot;:[&quot;bowling_alley&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;630 Village Rd SW, South Brunswick&quot;},{&quot;geometry&quot;:{&quot;location&quot;:{&quot;lat&quot;:33.974945,&quot;lng&quot;:-78.396355}},&quot;icon&quot;:&quot;http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png&quot;,&quot;id&quot;:&quot;abaf128a51021a535a17b1af4a523a5fc3af7d10&quot;,&quot;name&quot;:&quot;Planet Fun&quot;,&quot;photos&quot;:[{&quot;height&quot;:485,&quot;html_attributions&quot;:[],&quot;photo_reference&quot;:&quot;CnRtAAAACFYcotbimoFO1Jrqiy7PgLZ3Uuq4t1BLKvrewRdsV0aUZ4ay1jwtCaDQ-q2sh7EweO5At2YA3Mg-tukES9UXItwOn2uLD2sXenKg2UhkBSwa-bvd4RGAH-dg0uACDU_0_kCi7xHkv5WrgSiKmBVN8hIQYBr23I1W9dOQ5F6Rdn1wfRoUVBdp3FEoKA_0e29nzlnUem15BJs&quot;,&quot;width&quot;:1024}],&quot;rating&quot;:2.8,&quot;reference&quot;:&quot;CnRrAAAARZu90zQ_rp_pRX80BxqorM2GecSJ9kUkRnWNWEDx5K5JXwe9qgPdkzMsq8yOxITR1iPmS6knSWKNO-eWhYxBtJSti7O0ar1kkK2lBUhS5Kn6AxuT8bxlyuKLSuiGN3Zi-YFXI6d4nxhL7uO3K8LAnxIQNJ5TMpFhegaM3saANGrubBoUD7D9lw61ng3SmpK4g1dzf1cIVJ4&quot;,&quot;types&quot;:[&quot;amusement_park&quot;,&quot;establishment&quot;],&quot;vicinity&quot;:&quot;349 Whiteville Road Northwest, Shallotte&quot;}]
  </code></pre>