# Leave

<pre class="language-javascript"><code class="lang-javascript">const json = require("jsonbyte");


const file = new json("./file.json")
/*
{
"username": "jimmy",
"a": {
  "k": {
    "b": true
  }
<strong> }
</strong>}
*/

/*
we will use file.join to get b value
*/
const value = file.join("a").join("k").get("b");
console.log(value) // output: true

/*
after get value of b we need to get username value
*/
const username = file.leave().get("username")
/*
we used leave function to get out from all side objects
*/

/*
we need to change b value to false
*/
file.join("a").join("k").change("b", false)

// ❎ Wrong
file.save()

// ✅ Correct
file.leave().save()
</code></pre>
