Flash: Parsing a JSON file that has a node called Class -


essentially i'm trying parse json , assigning results variables, 1 of "var = json.class;" class being what's returned in json. however, flash won't let me parse because it's called class uses create new classes. there workaround or not able grab node?

i'm not sure if you're asking, if have property in json object named "class", should able parse shown below.

// assuming json object looks this, , stored in var named 'jsondata' var jsondata:object = { "id": 0, "class": "myclassname", "values": [1,2,3] } // trying parse won't work w/keywords 'class': var parsedvalue : string = jsondata.class; // parse way, using square brackets: var parsedvalue : string = jsondata["class"]; 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -