|
-
Help: setting array properties
Hi.
I have an array name region it has a couple of properties. "code", "name", "value"
I want to store this array in an indexed object called regions.
I would then like to access the object by referring to its sub property name
regions[1].code
regions[1].name
regions[1].value
I think I am doing something wrong.
I can set an array region.code, region.name and region.value but I can not set the regions values
regions[1].code = "abc"
regions[1].name ="alphabet"
regions[1].value =26
note: region is singular and regions is plural(many)
Can someone outline the variable definition and construct so I can access this information. Happy to replace the index field with the code value.
Thanks in advance
-
Still having difficulty in constructing this array
regions[index].code;
regions[index].nm;
regions[index].value;
or
regions[index],[region];
or
var region:Array("code","nm","value");
index=1;
regions[index] [code]= "A";
regions[index] [nm]= "abc";
regions[index] [code]= "123";
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|