tags:

views:

18

answers:

1

Hello! I have code:

api_result = '{"response":[{"uid":1969258,"first_name":"Walle","last_name":"Woo"}]}'; 
var myobj:Object = JSON.decode(api_result);

So, how I can get uid, first_name and last_name from "response" array?

+2  A: 
var UID:Object = myobj.response[0].uid;

var firstName:Object = myobj.response[0].first_name;

var lastName:Object = myobj.response[0].last_name;
thelost
Can also type those to String and cast them:var lastName:String = myobj.response[0].last_name as String;
James Ward