JavaScript mengonversi nilai objek ke array

function pluck(array, key) {
  return array.map(o => o[key]);
}
Stormy Squirrel