delete??
function removeAssociativeEntry (startArray, entryName) {
delete startArray[entryName];
}
regards,
Muzak
----- Original Message -----
From: "David Skoglund" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <[email protected]>
Sent: Wednesday, November 09, 2005 3:50 PM
Subject: [Flashcoders] removing a entry from an associative array?
The only solution I see is to create a new array by looping through the array
like this:
function removeAssociativeEntry (startArray, entryName) {
newarray=[];
for (var i in StartArray) {
if (entryName<>i) {
newarray [i]=startArray[i];
}
}
return (newarray);
}
This seems a bit silly, especially since I don't know how long these arrays are
gonna be. Is thery any inbuilt function for getting
the index of a associative entry?
/David
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders