Posts

Showing posts from May, 2017

WORKING WITH JSON

Image
After loading a JSON file into an HTML document, an object (or an array) appears. So "working with JSON" means "working with object". For example to clone obj object we can do the following: cloneObj = JSON.parse (JSON.stringify (obj)); And when we see that youtube JSON contains too much information, that makes the size of the content to be saved too large then we can reduce the file size using the "delete" operator. Example Deleting information about data and time of publishing the video: delete response.items [i] .snippet.publishedAt; Please follow these steps to try my "search-save-json.html" file 1. Download the program XAMPP and istall it to your PC. In the folder C:\xampp\htdocs create the subfolder v3 (C:\xampp\htdocs\v3) All the files (html, javascript-video-list files, images) you will create need to be placed in the folder v3 (or in any other subfolder of the folder htdocs) 2. Let obtain your own youtube API v