My code is,
let data={type:1, name:"tye", address:"hbjh454"}
I want this object like,
let data={ name:"tye", address:"hbjh454"}
I need to Remove type from this object
CodePudding user response:
You can use the delete
operator
let data = { type: 1, name: "tye", address: "hbjh454" };
delete data.type;
console.log(data);