Pages
Home
Java
Android
Php
Cake PHP
jQuery
Grails
All Pages
Monday, June 3, 2013
jQuery delete a given key from array
When I have an array like this:
var test = Array();
test['key1'] = 'value1';
test['key2'] = 'value2';
I believe the
delete
operator in JavaScript will solve this:
var test = new Array();
test['key1'] = 'value1';
test['key2'] = 'value2';
delete test['key1']; // will remove key1 from the array
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment