Is there any altenative for Jquery $.map(array, function(item)) in mootools.
How can I change following JSON result
{"totalResultsCount":2,"geonames":[{"countryName":"India","name":"Cochin"},{"countryName":"Canada","name":"Cochin"},{"countryName":"Venezuela","name":"Cochina"}]}
as
[{"countryName":"India","name":"Cochin"},{"countryName":"Canada","name":"Cochin"},{"countryName":"Venezuela","name":"Cochina"}]
I need mootools alternate for following jquery
function(data) {
response($.map(data.geonames, function(item) {
return {
label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName,
}
}))
Any help please