json
Loads a JSON file and returns its content as a dictionary if it's representing a JSON object, or as an iterable collection if it's representing a JSON array.
From a JSON array:
.json {people.json}::foreach
.1::get {name} is from .1::get {address}::get {country}Content copied to clipboard
From a JSON object:
.json {config.json}::get {database}::get {host}Content copied to clipboard
Temporary scoping of a JSON object via let:
.json {user.json}::let
.1::get {name} is .1::get {age} years oldContent copied to clipboard
Return
a dictionary or iterable representing the content of the JSON file located in path
Parameters
path
path of the JSON file (with extension) to load
Throws
if the file does not exist or is not a valid JSON file
Permissions
project-read
to read JSON files located in the project directory
global-read
to read JSON files located outside the project directory