Randel Ramirez Randel Ramirez - 1 year ago 126
Javascript Question

In jquery how do I remove an array element either via index["key"] or value

In jQuery/JavaScript, How do I remove an array element?

something like:


// or


Answer Source

Judging by your code, it sounds like you want to delete an object's property, which you would do with delete:

var obj = { key: "value" };

delete obj["key"];

A very useful guide on working with objects in JavaScript can be found on MDN.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download