标签: javascript
var param = "statut"; // I want this expression : data.param.function1().function2(); // to be equivalent to : data.statut.function1().function2();
答案 0 :(得分:4)
尝试使用:
var param = 'status'; data[param]function1().function2()