# Associative Array - How to?

**URL:** <https://forum.kirupa.com/t/associative-array-how-to/314634>\
**Category:** flash\
**Created:** [October 5, 2010, 12:45am UTC](https://forum.kirupa.com/t/associative-array-how-to/314634 "2010-10-05T00:45:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [October 5, 2010, 12:45am UTC](https://forum.kirupa.com/t/associative-array-how-to/314634/1 "2010-10-05T00:45:13Z")

</div>

I’m looking to create an array with at least 3 different elements: description, price and quantity, something like this (but not working yet) -

```auto

var itemArray:Array = new Array();
itemArray["artwork"] = {description:undefined, price:0.00, quantity:1};

for (var i:Number = 1; i <= count; i++) {
    itemArray["artwork"]*.description = prod_num;
    itemArray["artwork"]*.price = 0.00;
    itemArray["artwork"]*.quantity = 1;
    trace(itemArray["artwork"]*.description); //All UNDEFINED
    trace(itemArray["artwork"]*.price); //All UNDEFINED

    //itemArray["artwork"].quantity exists but it isn't possible to add a series of elements in this array - Why???
}

```
