// Replace or an array of objects inside the corresponding variable names and values // define a variable var jsonObj; // variables which we desired object or array jsonObj = {code: "200" , name: "300", sex : "400" }; // define a new variable so that he is equal to the object you want to change the value of the let codeVal = jsonObj.code; // then remove unneeded or unwanted objects the delete jsonObj.code; // new definition of a Object property equal to the value you want jsonObj.supCode = codeVal;