# Create associative array using vars

**URL:** <https://forum.kirupa.com/t/create-associative-array-using-vars/287229>\
**Category:** flash\
**Created:** [April 28, 2009, 11:15am UTC](https://forum.kirupa.com/t/create-associative-array-using-vars/287229 "2009-04-28T11:15:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![elyleebert](https://avatars.discourse-cdn.com/v4/letter/e/e56c9b/32.png) [@elyleebert](https://forum.kirupa.com/u/elyleebert)\
**Post date:** [April 28, 2009, 11:15am UTC](https://forum.kirupa.com/t/create-associative-array-using-vars/287229/1 "2009-04-28T11:15:48Z")

</div>

Hi

Just wondering if anyone knows how to create an associative array but using variables. eg

expertArray.push( { Index: 0, Name: “My name” } )

where ‘Name’ could be a variable as I am doing a translation of an existing application, for example:

var\_name:String = “nom”;  
expertArray.push( { Index: 0, var\_name: “My name” } )

this takes the literal meaning, so this example does not work.

Any ideas?
