I have an array as below
var array = [];
var item1 = 'k1';
var itemvalue1 = {'key1':'value1'};
array[item1] = itemvalue1;
var item2 = 'k2';
var itemvalue2 = {'key2':'value2'};
array[item2] = itemvalue2;
Two questions...
- How to get the position(index) of the item2 in the array
- How to remove the item item2 from the array
Any help is appreciated.
via Riyas
No comments:
Post a Comment