Function Updated 23 Oct 2026
getJson(filepath)
Loads a document and returns its stored values as an object. Works on any document — a .json code file, or a schema document (you get its fields).
Parameters
filepathstringrequiredPath of JSON (code file) to load as object.
Returns
The parsed object. null when the file does not exist. Throws if the path is empty. A document in an encrypted folder is decrypted, which requires unlockFolder first.
Example
Normal JavaScript, running in the browser or on the Docly™ server.
let data = docly.getJson("Test files/Test.json");
data.Added = "I added this property";
return JSON.stringify(data);The JavaScript above produces this output:
{"Content":"{\n \"Description\" : \"This is a test file\"\n}","Added":"I added this property"}