从访问器中提取字段名称,还是使用访问器进行设置?

我正在传递访问器功能

let species_accessor = d => d.species;

给定一个对象

let alpha = {};

I would like to use whichever field ('species' here) the accessor is defined on, to set that field in the object.

species_accessor(alpha) = 'unknown';

那不会飞。

console.log(alpha);

我忘了传递访问器函数,而只是传递字段名称

let species_field_name = 'species';

然后设置字段非常简单

let beta = {};
beta[species_field_name] = 'unknown';
console.log(beta);

但这很笨拙。

如何从访问器函数中提取字段名称,或者如何使用访问器进行设置而不是获取?