Item list reading...

I have one file to read current equipment, one will change equipment and another file will have all ID’s of the games items.

I want to read the ID’s attributes like this:

1001.name
1001.slot
1001.armor

from the item list…

I need this in javaScript:
(or any other way to read 1001.Name etc)

1001 = { 
Name = "Training helmet";
slot = 1;
armor = 5;
}

B
U
M
P

I would really appreciate if someone would take just a little time to help me in any way.

Have you tried using Hashtables?

var itemList = new HashTable();
var item = new Hashtable();
itemList.Add("1001",item);
item.Add("Name","Training helmet");
item.Add("Slot",1);


..
...
if(itemList.ContainsKey("1001"))
   if(itemList["1001"].ContainsKey("Name")
       print(itemList["1001"]["Name"]);

The reading/writing to file is something you’d still have to figure out.