How can I make this happen:
var name = otherObject.name; //"string"
var o = {
name : otherObject
};
alert(o["string"].name);
Dynamic properties of structures characterize a system in form of natural frequencies, damping and mode shape. These dynamic properties are used to formulate mathematical model for its behavior. The evaluation of dynamic properties of is Nnown as modal analysis.
Objects have properties that can be observed and described. Physical properties include size, shape, and texture.
Objects have two types of properties: data and accessor properties.
Use bracket notation instead.
var name = otherObject.name;
var o = {};
o[name] = otherObject;
Or, in modern JavaScript:
var o = {
[name]: otherObject,
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With