JSFiddle - React, Tailwind, and code Playground
JavaScript
function pluck(array,key){
var a = [],
i1 = -1, i2 = array.length,
o ;
while(++i1 < i2)
{
o = array[i1] ; // you have to use the bracket operator here
if(o.hasOwnProperty(key)) a[a.length] = o[key] ;
}
return a ;
}
var Tuts = [{name : 'NetTuts', niche : 'Web Development'}, {name : 'WPTuts', niche : 'WordPress'}, {name : 'PSDTuts', niche : 'PhotoShop'}, {name : 'AeTuts', niche : 'After Effects'}];
var niches = pluck(Tuts, 'niche');
console.log(niches);