# Associative Arrays

**URL:** <https://forum.kirupa.com/t/associative-arrays/247128>\
**Category:** flash\
**Created:** [December 18, 2007, 8:27pm UTC](https://forum.kirupa.com/t/associative-arrays/247128 "2007-12-18T20:27:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Exodar](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@Exodar](https://forum.kirupa.com/u/Exodar)\
**Post date:** [December 18, 2007, 8:27pm UTC](https://forum.kirupa.com/t/associative-arrays/247128/1 "2007-12-18T20:27:47Z")

</div>

i’m trying to use associative arrays to store my variables but am  
looking for a solution to change the value of array1\* to array2\*.  
since it’s an associative array, the only way i know how to loop  
through these kinds of arrays is by the following:

```auto
for(var i in array1) {
trace(array1*;
}

```

what i would do when using indexed arrays to change the value  
of array1\* to array2\* would be something like this:

```auto
for(i=0; i<array1.length; i++) {
array1* = array2*;
}

```

however, i can’t see any way you can do this with associative arrays  
because they do not have a numbered index such that in a loop you could  
say array1\* = array2\* .

so i’m looking for a way to do this with associative arrays.

thx in advance
