JS extract an object's property
function property(name){ return function(object){ return object[name]; }; }; //Use var getName = property("name") var name = getName({name: "Roberto"}); myMap.map(property('name')).join(", );