Remove property in Javascript -


this question has answer here:

i have following object

b.push({ data: d, width: 5, color: color }); 

then have

b= [{data:10,width:5, color:"yellow"},{data:12,width:5, color:"red"},etc...]; 

i added color property , not need , want remove it. know easiest way it?

you can delete using delete

delete b[0].color 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - How can I echo out this array? -

javascript - IE11 incompatibility with jQuery's 'readonly'? -