function pluck(objects, fieldName) {
var arr = [];
for (var i = 0; i <= objects.length; i++) {
for (var key in objects[i]) {
if (key == fieldName) {
arr.push(objects[i][key]);
};
}
};
return arr;
}
ZnVuY3Rpb24gcGx1Y2sob2JqZWN0cywgZmllbGROYW1lKSB7Cgl2YXIgYXJyID0gW107CgoJZm9yICh2YXIgaSA9IDA7IGkgPD0gb2JqZWN0cy5sZW5ndGg7IGkrKykgewoKCQlmb3IgKHZhciBrZXkgaW4gb2JqZWN0c1tpXSkgewogCQkgCWlmIChrZXkgPT0gZmllbGROYW1lKSB7CiAJIAkJYXJyLnB1c2gob2JqZWN0c1tpXVtrZXldKTsKIAkJCX07CgkJfQoJfTsKCXJldHVybiBhcnI7Cn0=