Given:
var x = {
myproperty: 'my value'
};
You can access the value by:
var value = x['myproperty'];
If you're looking for a global variable, then you would check its container (window
);
var value = window['x']['myproperty'];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…