I am trying to add the object in an arraycollection in the following way
var var1:String = 'Column1';
I need the array collection to have data like
However, by the above code, the array collection stores the following value
Actually, I will come to know about the columns names in run time and I have to map this array collection to the datagrid.
Jai Kishan Shah
Create an instance of Object and set the property.
var var1:String = "Column1"; var obj:Object = new Object(); obj[var1] = "test1"; arraycollection.addItem(obj);
It is working fine as per your suggestion.
Thank you very much.