Tell us what’s happening:
I tried this code. its working but, when I tried for"console.log(“artist”) its showing “Deep Purple”.
suppose i want to “Billy Joel”,
how to get it.
Your code so far
var myMusic = [
{
"artist": "Billy Joel",
"title": "Piano Man",
"release_year": 1973,
"formats": [
"CD",
"8T",
"LP"
],
"gold": true
},
{"artist": "Deep Purple",
title: "Smoke on the water",
release_year: 1976,
formats: ["CD", "8T", "LP"]
}
];
console.log(myMusic[1]["artist"]);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.117 Safari/537.36
.
Challenge: Manipulating Complex Objects
Link to the challenge: