# Array question

**URL:** <https://forum.kirupa.com/t/array-question/180428>\
**Category:** Uncategorized\
**Created:** [February 28, 2006, 4:12pm UTC](https://forum.kirupa.com/t/array-question/180428 "2006-02-28T16:12:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morix](https://avatars.discourse-cdn.com/v4/letter/m/dfb087/32.png) [@Morix](https://forum.kirupa.com/u/Morix)\
**Post date:** [February 28, 2006, 4:12pm UTC](https://forum.kirupa.com/t/array-question/180428/1 "2006-02-28T16:12:56Z")

</div>

Hi guys,

I have a array where I put the products id and the amount of that same product in it.

example:

cart[23443] = 1; (where the array key is the id)

when I trace the cart array, flash walks trough all the keys (from 0 to 23443) and that takes a long time.

Is there a other way to do it? like this maybey:

cart[0][id] = 23443  
cart[0][amount] = 1

thnx in advance!!!:beam:

PS: How can you trace the key of an array in AS?
