Skip to content

A simple scratch extension that allow access to values of JSON objects online.

Notifications You must be signed in to change notification settings

mk-smart/Web-Object-Scratch-Extension

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Web Object Scratch Extension

A simple scratch extension that allow access to values of JSON objects online.

What does it do

This simple JavaScript extension allows you to access the attributes of JSON objects online from Scratch, from their URL and simple representation of their properties. It adds blocks for declaring objects and properties, and access their values that can be assigned to variables or used directly in expressions to change, for example, the size, direction, position of srpites.

How to install it

Because this is not an official extension, you can need to take some steps to use it:

  1. Create or open a projet on scratch.mit.edu
  2. Open the JavaScript console in you browser
  3. Copy-paste the JavaScript code in the extension

Once you have done that, new blocks should appear in the "More blocks" section of scratch. If you have opened a project that already uses this extension, but it is not loaded, the corresponding block will show "undefined". Reproducing the steps above should fix that.

How to use it

Once you have installed it, the use is relativly simple. You can define an object using its URL, asusming that this URL would respond with JSON code if called. You can define a property using the JSONPath to access the value your are looking in the corresponding object. For example, to get the value of the first item in the list of search results might look something like "results[0].value"

Examples and other documentation

... will come soon.

About

A simple scratch extension that allow access to values of JSON objects online.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%