We are going to learn from other peoples work. To do this we can look inside an existing project and try to figure out how it works.

You can also look at the files contained within a scratch project. This means you can do more that is possible than just using the scratch editor on its own.

Inside scratch project go to file – save to local computer. This should download a file to your local computer with the the name {projectname}.sb3. Browse to the folder that contains the downloaded project file. We now need to show the file name extensions for this folder. In the tool ribbon at the top of the explorer window select view and in the show/hide box tick file name extensions. This will show the extension names for the files in your folder. Now we can rename the downloaded scratch project to allow you to look inside. The scratch project file is just a zip container that has been renamed to {project name}.sb3. Right click on this file and select rename from the pop up window. Add .zip at the end of the filename so that the file is now called {project name}.sb3.zip. This will allow you to open the file as a zip. Now you just need to right click the file and choose extract.

The folder contains all the assests from the project, this includes the projects images and audio files. It also contains the code for the project which is stored in the file project.json.

http://jsonviewer.stack.hu/

https://jsonformatter.org/json-pretty-print