title: How to delete JSON Element in PHP?
body: <p>I have a JSON object key element that i want to delete.
  Lets say i want to delete the element of everything inside 'v8fe3m'</p>
  <p>I tried using unset and delete. Nothing seems work unless my syntax is wrong.</p>
  <pre><code>{
    &quot;projects&quot;: {
      &quot;587ye4&quot;: {
        &quot;name&quot;: &quot;abc&quot;,
        &quot;ip&quot;: &quot;zz&quot;,
        &quot;loc&quot;: &quot;azz&quot;
      },
      &quot;v8fe3m&quot;: {
        &quot;name&quot;: &quot;japan&quot;,
        &quot;ip&quot;: &quot;aaa&quot;,
        &quot;loc&quot;: &quot;123&quot;,
        &quot;backups&quot;: {
          &quot;HELLO_1595524710053&quot;: {
            &quot;ts&quot;: 1595524710053,
            &quot;name&quot;: &quot;HELLO&quot;,
            &quot;size&quot;: 770641
          },
          &quot;HELLO_1595524717330&quot;: {
            &quot;ts&quot;: 1595524717330,
            &quot;name&quot;: &quot;HELLO&quot;,
            &quot;size&quot;: 770641
          },
          &quot;HELLO_1595524717558&quot;: {
            &quot;ts&quot;: 1595524717558,
            &quot;name&quot;: &quot;HELLO&quot;,
            &quot;size&quot;: 770698
          }
        }
      },
      &quot;x0190a&quot;: {
        &quot;name&quot;: &quot;dubai&quot;,
        &quot;ip&quot;: &quot;101&quot;,
        &quot;loc&quot;: &quot;UAE&quot;
      }
    }
  }
  </code></pre>
  <pre><code>$user_token = $_SESSION[&quot;userToken&quot;];
  $user_projects_json = read_json($GLOBALS['URL_JSON'] . &quot;$user_token&quot; . &quot;_projects&quot; .&quot;.json&quot;);
  $projectKey = $_REQUEST['dataKey'];
  $projectKey = trim($projectKey,&quot; &quot;);
  //v8fe3m
      $backups = $user_projects_json['projects'][$projectKey];
      
      unset($backups);
  
  </code></pre>