nexted objects in js code example
Example: Accessing Nested Objects
// Setup
var myStorage = {
"car": {
"inside": {
"glove box": "maps",
"passenger seat": "crumbs"
},
"outside": {
"trunk": "jack"
}
}
};
var gloveBoxContents = myStorage.car.inside["glove box"]; // "maps"
console.log(gloveBoxContents); // to test your code