you can get element in array via file.createElm function
file.createElm
const json = require("jsonbyte"); const file = new json("./file.json") /* { "username": "body", "ranks": [ "owner", "member", "first", "pro" ] } */ const comment = file.file.join("ranks").getElm(0) console.log(comment); // output: owner
Last updated 2 years ago