Node.js examples for Array:Array Operation
Extract attribute from array
"use strict";//from w w w.ja v a2s . c om Array.prototype.extract = function(attribute) { var newArr = []; for (var i = 0; i < this.length; i++) { newArr.push(this[i][attribute]); } return newArr; }