# Arrays - dynamic field names?

**URL:** <https://forum.kirupa.com/t/arrays-dynamic-field-names/305814>\
**Category:** flash\
**Created:** [March 4, 2010, 1:28am UTC](https://forum.kirupa.com/t/arrays-dynamic-field-names/305814 "2010-03-04T01:28:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankleber](https://avatars.discourse-cdn.com/v4/letter/y/46a35a/32.png) [@yankleber](https://forum.kirupa.com/u/yankleber)\
**Post date:** [March 4, 2010, 1:28am UTC](https://forum.kirupa.com/t/arrays-dynamic-field-names/305814/1 "2010-03-04T01:28:32Z")

</div>

Hi,

I need to create dynamic arrays with field names loaded from a database. So, the names for the fields will be always different.

Then, suppose I have the names “product” and “color” to create the following array structure dynamically:

var myarray:Array = new Array;  
myarray[0] = ({product:undefined,color:undefined});

But in other ocasion, the names may be say “brand” and “model”, so the array will be:

myarray[0] = ({brand:undefined,model:undefined});

And so on…

How to do that?

PS: Please notice that I am not concerned with the contents of the array, but the field names…

Any clue apreciated!
