JSFiddle - React, Tailwind, and code Playground

by ham ism

JavaScript

// Original json object to work with 
originalJson = {name:'myname',age:30};

// delete an attribute from the originalJson 
// so we can't access the age attribute(property) any more
// unless we create for the second time 
delete originalJson.age

// OR use the second method 

// apply the changes on a copy of the originalJson 
originalJson2 = JSON.stringify(originalJson);
originalJson2 = JSON.parse(originalJson2);
delete originalJson2.age 

// if you use the second method you will get undefined for the first and 30 for the second 
console.log(originalJson.age);
console.log(originalJson2.age);