Join
const json = require("jsonbyte");
const file = new json("./file.json")
/*
{
"username": "jimmy",
"a": {
"k": {
"b": true
}
}
}
*/
/*
we will use file.join to get b value
*/
const value = file.join("a").join("k").get("b");
/*
you can also use all functions of property like get, create, remove and exists
*/
console.log(value) // output: true
Last updated