Var attrName1:String = "data"; Var attrName2:String = "label"
var obj:Object = new Object(); obj[attrName1] = "hello"; obj[attrName2] = "hai"; myArr.addItem(obj) ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Girish Sent: Tuesday, November 20, 2007 8:48 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED]; [email protected] Subject: [flexcoders] How to dynamically create the ArrayCollection attribute names at run time? Hi, I am also facing same problem, but in my cause i want to define ArrayCollection attribute names at run time. var myArr:ArrayCollection = new ArrayCollection(); myArr.addItem({ data: "hello", label: "hai" }); i wantto assign the 'data' and 'label' attribute name at runtime. how can i achieve this Thanks Girish

