I have
var myArrayVariable1 = new Array();
var myStringVariable1 = 'myArrayVariable1';
var myStringVariable2 = 'myArrayVariable2';
Is there any way to figure out if one of the strings match the variables name? In case above, myStringVariable1.Value = myArrayVariable1.VariablesName
My conundrum:
I have around 100 objects that are unique to each user.
I need to update each object each minute
Each object is named as the database id; javascript would have to locate the object, delete it and then re-create it using new values (these are pulled via json)
So I need to locate the object (using the string that I have gotten from the json), then I need somehow call that object to delete it…
kind of stuck here.
In abstract I am looking for something like this:
foreach(object obj in allObjects){
if (obj.ActualName==="something"){
obj.Delete();
}
}
After some thinking, and no answer to my question, I am thinking about using some sort of dictionary (a hashmap equivalent) to track all the objects
if the variable is part of an object, you can traverse on it :