Remove property in Javascript -
this question has answer here:
- how remove property javascript object? 24 answers
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
Post a Comment