0

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

Lex V
  • 1,414
  • 4
  • 17
  • 35

1 Answers1

2

You can use the delete operator

let data = { type: 1, name: "tye", address: "hbjh454" };

delete data.type;

console.log(data);
Jacob Stephenson
  • 544
  • 3
  • 13