I believe you can use a for..in statement to access the property names. Something like:
for (var name in myJsonObj) { trace(name + " : " + myJsonObj[name]); } http://livedocs.adobe.com/flex/201/langref/statements.html#for..in --- In [EMAIL PROTECTED], "eric_mahe" <[EMAIL PROTECTED]> wrote: > > Hi all, > > I am using the com.adobe.serialization.json library to parse a dynamic > JSON String like this one: > {"list":[1,2,3],"valid":"O","id":"file"} > It's working pretty well. > > The JSON.decode method create an object in which one the (list,valid, > id) are becoming dynamic variables: > > Object > list = Array > [0] = 1:Number > [1] = 2:Number > [2] = 3:Number > valid = "O":String > id = "file":String > > > The problem is that i need to display the name of the variables names > (list, valid, id in this case) and values in order to allow the user > to change the values in a flex application. > > Have anyone experienced the same issue? Any Idea? > Thanks for your help! > > P.S.: Note that the JSON string is dynamic, so i need to evaluate the > names of the variables at runtime. > > Eric >