On Mon, 7 Mar 2005 19:49:02 -0500, Tracy Spratt <[EMAIL PROTECTED]> wrote:

> I have an associative array in a variable created like so: 
> 
> goData = new Object(); 
> 
> var oData:Object; 
> 
> for ( var i:Number=0; i<5; i++ ) { 
> 
> oData = new Object({name:"Name of item " + i}) 
> 
> goData["key" + i] = oData; 
> 
> }//for ( var i:Number=0;.... 
> 
> I can iterate through it and see the data fine. 
> 
> But how do I reference it in the dataProvider property to get an item for
> each element? Using toArray() results in a single item with 5 properties. (I
[snip]

I'm not sure I understood your question correctly, but I guess you're
looking for a way to iterate through the properties of the object
referenced by 'goData'?

for (var p in goData)
trace(p + " = " + goData[p]);

Manish


Reply via email to