The code needed to extract email addresses from an array of JS-objects, using MooTools (data is an array of objects):
var emailAddresses = data.map(function(item){
return item.email || null;
}).clean();
Download here.
General MooTools documentation here.
6 comments:
You gotta love the simplicity.
I've loved MooTools for it's syntax/structure since the first time I discovered it.
Being able to use part of the framework on the server is fantastic! :)
Here I was, thinking that nah, I'll stick with jQuery, thank you very much, until the phrase "server-side" struck me... guess I'll be implementing this first thing tomorrow :D
Thank you!
You're welcome!
Give it time, and you soon you'll convert to the church of MooTools.. :P
what about the plugin ecosystem on JQuery?
@Quintessens: I have no idea what you're talking about. I never joined the jQuery movement.. :)
Post a Comment