ES6から[]
で囲むことでオブジェクトのプロパティ名に変数や式を記述できるようです。
ただしオブジェクト初期化時のみ。
const hoge = "HOGE";
const obj = {
[1 + 1]: "two",
[hoge]: "just hoge",
[`expand ${hoge}`]: "expand hoge"
};
console.log(JSON.stringify(obj,null,2));
結果
{
"2": "two",
"HOGE": "just hoge",
"expand HOGE": "expand hoge"
}