📅  最后修改于: 2022-03-11 15:02:24.336000             🧑  作者: Mango
let nestedObject = { levelOne: { levelTwo: { levelThree : 'final destination'} } }
const prop1 = 'levelOne';
const prop2 = 'levelTwo';
const prop3 = 'levelThree';
var destination = nestedObject[prop1][prop2][prop3];
// destination = 'final destination'