I am struggling with indexing values from a multi-level JSON array. Here is the JSON data in question:
{
"items": [
{
"snippet": {
"title": "YouTube Developers Live: Embedded Web Player Customization"
}
}
]
}
My goal is to access the title value, but so far my attempts have resulted in undefined responses:
console.log(data["items"][0].title);
or:
console.log(data["items"][0]["title"]);
However, this code successfully retrieves the snippet object:
console.log(data["items"][0]);
The 'data' variable holds the json data. How can I correctly index and retrieve the desired value?