Upon processing the following JSON data:
foobar({
"kind": "youtube#searchListResponse",
"etag": "\"I_8xdZu766_FSaexEaDXTIfEWc0/pHRM7wJ9wmWClTcY53S4FP4-Iho\"",
"nextPageToken": "CAUQAA",
"regionCode": "PL",
"pageInfo": {
"totalResults": 686,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#searchResult",
"etag": "\"I_8xdZu766_FSaexEaDXTIfEWc0/hpaieEHTq-SS7i8XR2SdBPqendk\"",
"id": {
"kind": "youtube#video",
"videoId": "j6r_N251pNQ"
}, "width": 480,
"height": 360
}
},
"channelTitle": "arhn.eu",
"liveBroadcastContent": "none"
}
},
The code snippet mentioned below uses a variable json_string
that contains the aforementioned JSON data:
var json = JSON.parse(JSON.stringify(json_string));
alert(json['foobar']);
Is there a way to access the value of videoId
?