# Using an array variable in another array

**URL:** <https://forum.kirupa.com/t/using-an-array-variable-in-another-array/318688>\
**Category:** flash\
**Created:** [January 27, 2011, 8:36am UTC](https://forum.kirupa.com/t/using-an-array-variable-in-another-array/318688 "2011-01-27T08:36:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanzochan](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@sanzochan](https://forum.kirupa.com/u/sanzochan)\
**Post date:** [January 27, 2011, 8:36am UTC](https://forum.kirupa.com/t/using-an-array-variable-in-another-array/318688/1 "2011-01-27T08:36:43Z")

</div>

Sorry if the title is a little confusing. Here’s what I meant - I have an array and and object. Let me give a visual:

This is my object:

```
obj["id"] = ["1","2","3"];
obj["name"] = ["na","no","ne"];

```

my itemArray:

```
itemArray = ["id","name"];

```

And now, I want to retrieve the items in the object, I tried

```auto
for (var i:int = 0; i<objLen; i++)
    {
    	for (var j:int = 0; j<count; j++)
    	{
    		textBox_txt.appendText(obj.arr*[j]);
    	}
    }

```

but it doesn’t work. How do I actually use the arr\* variable in the array? :s
