6
Shouts

jQuery.map() in 1.6 » Learning jQuery - Jordan Boesch

published 775 days, 19 hours, 43 minutes ago posted by iftekharahmedamitiftekharahmedamit 776 days, 21 hours, 22 minutes ago
Thursday, May 05, 2011 3:20:37 PM GMT Wednesday, May 04, 2011 1:42:30 PM GMT

Among all of the great fixes and additions to jQuery 1.6, I'm happy to say that jQuery.map() now supports objects! The previous map only supported arrays. With other libraries already offering object support for map, it was a nice addition.

Let's say you want to collect an array of object keys from a JSON object. PLAIN TEXTJavaScript: var myObj ={    "name":"jordan",    "haircolor":"brown",    "eyecolor":"ravishing"};

Here's how you would have done it in older versions of jQuery (prior to 1....

category: Web Dev | clicked: 2 | | source: www.learningjquery.com | show counter code
tags: jQuery, jQuery 1.6

2 comments posted.

To post your comment please login or signup