hey all i was trying to extract a specific part from a json data but i am unable to do it
json data :-
{
“kind”: “youtube#searchListResponse”,
“etag”: “WCgyqo_rJnTjRCTvkFqHdBxk6WE”,
“nextPageToken”: “CAUQAA”,
“regionCode”: “IN”,
“pageInfo”: {
“totalResults”: 1000000,
“resultsPerPage”: 5
},
“items”: [
{
“kind”: “youtube#searchResult”,
“etag”: “6VseK9iKSJuahByifXt6PzESqOE”,
“id”: {
“kind”: “youtube#video”,
“videoId”: “u2TU0_aW2eY”
},
“snippet”: {
“publishedAt”: “2013-06-11T02:32:46Z”,
“channelId”: “UC3kjTskNog1CgSNul7qwHVA”,
“title”: “Manipuri song Ho Leishabi Bala And Soma”,
“description”: “”,
“thumbnails”: {
“default”: {
“url”: “https://i.ytimg.com/vi/u2TU0_aW2eY/default.jpg”,
“width”: 120,
“height”: 90
},
“medium”: {
“url”: “https://i.ytimg.com/vi/u2TU0_aW2eY/mqdefault.jpg”,
“width”: 320,
“height”: 180
},
“high”: {
“url”: “https://i.ytimg.com/vi/u2TU0_aW2eY/hqdefault.jpg”,
“width”: 480,
“height”: 360
}
},
“channelTitle”: “Ved Takhel”,
“liveBroadcastContent”: “none”,
“publishTime”: “2013-06-11T02:32:46Z”
}
},
{
“kind”: “youtube#searchResult”,
“etag”: “gU5atSofKiAj1Ss3ecw1chdCPWo”,
“id”: {
“kind”: “youtube#video”,
“videoId”: “ifjSM8knNyE”
},
“snippet”: {
“publishedAt”: “2019-10-21T06:17:00Z”,
“channelId”: “UCW01vmM4gJux-KkXKWywyLg”,
“title”: “Best Song of Oct 2019 | Bala Bala Shaitan ka Sala”,
“description”: “Best Song of Oct 2019 | Bala Bala Shaitan ka Sala #Balabalasong #Sahitankasala #abhijeetmeshram My Website Hosting Partner:- …”,
“thumbnails”: {
“default”: {
“url”: “https://i.ytimg.com/vi/ifjSM8knNyE/default.jpg”,
“width”: 120,
“height”: 90
},
“medium”: {
“url”: “https://i.ytimg.com/vi/ifjSM8knNyE/mqdefault.jpg”,
“width”: 320,
“height”: 180
},
“high”: {
“url”: “https://i.ytimg.com/vi/ifjSM8knNyE/hqdefault.jpg”,
“width”: 480,
“height”: 360
}
},
“channelTitle”: “Abhijeet Meshram”,
“liveBroadcastContent”: “none”,
“publishTime”: “2019-10-21T06:17:00Z”
}
},
{
“kind”: “youtube#searchResult”,
“etag”: “_Yk1aIe9e7FaDr3V-7W-C9_k_Ok”,
“id”: {
“kind”: “youtube#video”,
“videoId”: “Bj_xaltfmEU”
},
“snippet”: {
“publishedAt”: “2019-10-25T06:57:06Z”,
“channelId”: “UC56gTxNs4f9xZ7Pa2i5xNzg”,
“title”: “Naah Goriye -Bala | Ayushmann Khurrana | Harrdy Sandhu | Swasti Mehul |B Praak | Jaani | Sonam Bajwa”,
“description”: “Catch a glimpse of the side of Bala in Naah Goriye ! Ayushmann Khurrana absolutely slays us with moves accompanied by the uber talented Harrdy …”,
“thumbnails”: {
“default”: {
“url”: “https://i.ytimg.com/vi/Bj_xaltfmEU/default.jpg”,
“width”: 120,
“height”: 90
},
“medium”: {
“url”: “https://i.ytimg.com/vi/Bj_xaltfmEU/mqdefault.jpg”,
“width”: 320,
“height”: 180
},
“high”: {
“url”: “https://i.ytimg.com/vi/Bj_xaltfmEU/hqdefault.jpg”,
“width”: 480,
“height”: 360
}
},
“channelTitle”: “Sony Music India”,
“liveBroadcastContent”: “none”,
“publishTime”: “2019-10-25T06:57:06Z”
}
},
{
“kind”: “youtube#searchResult”,
“etag”: “F9AvwWTTmUIYZ7cNlfuzdrWUX0c”,
“id”: {
“kind”: “youtube#video”,
“videoId”: “6aFWjMeCuoc”
},
“snippet”: {
“publishedAt”: “2020-04-15T03:08:53Z”,
“channelId”: “UCwRLhkSLS9c5OkxlU4H2LmA”,
“title”: “Housefull 4 - Shaitan Ka Saala (Full Video Song) | Akshay Kumar | Bala Bala”,
“description”: “Mera New Channel Me Giveway Ho Raha Hai Agar Aap Mere Youtube Channel Ko Subscribe Kar Lete Hai To Aap Bhi participate Kar Sakte Hai Bas Apako …”,
“thumbnails”: {
“default”: {
“url”: “https://i.ytimg.com/vi/6aFWjMeCuoc/default.jpg”,
“width”: 120,
“height”: 90
},
“medium”: {
“url”: “https://i.ytimg.com/vi/6aFWjMeCuoc/mqdefault.jpg”,
“width”: 320,
“height”: 180
},
“high”: {
“url”: “https://i.ytimg.com/vi/6aFWjMeCuoc/hqdefault.jpg”,
“width”: 480,
“height”: 360
}
},
“channelTitle”: “YT Shorts Video”,
“liveBroadcastContent”: “none”,
“publishTime”: “2020-04-15T03:08:53Z”
}
},
{
“kind”: “youtube#searchResult”,
“etag”: “ko1s11OBkSQSwEvT_Etxnz20zJQ”,
“id”: {
“kind”: “youtube#video”,
“videoId”: “lFCfqxMk7TY”
},
“snippet”: {
“publishedAt”: “2020-04-20T17:58:44Z”,
“channelId”: “UCt5myrD4zpdIgriDxmN0UmA”,
“title”: “Bala Song | Bala Bala | Bala Bala Song | Bala Parody | Bala Bala Shaitan Ka Saala | Parody Song”,
“description”: “Bala Song - “Bala Bala Shaitan Ka Sala”: Bala is at home due to CoronaVirus and he doesn’t like it. Puzzilla presents Bala Song: Shaitan Ka Saala Bala singing …”,
“thumbnails”: {
“default”: {
“url”: “https://i.ytimg.com/vi/lFCfqxMk7TY/default.jpg”,
“width”: 120,
“height”: 90
},
“medium”: {
“url”: “https://i.ytimg.com/vi/lFCfqxMk7TY/mqdefault.jpg”,
“width”: 320,
“height”: 180
},
“high”: {
“url”: “https://i.ytimg.com/vi/lFCfqxMk7TY/hqdefault.jpg”,
“width”: 480,
“height”: 360
}
},
“channelTitle”: “Puzzilla”,
“liveBroadcastContent”: “none”,
“publishTime”: “2020-04-20T17:58:44Z”
}
}
]
}
the part that i want to extract
“videoId”: “u2TU0_aW2eY”
You can find this part in the data by ctrl+f
my code :
i may be wrong as i am not too good in json
and the url is correct , it contained my api key so i hide it