0

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?

1 Answer 1

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

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

var lastName:Object = myobj.response[0].last_name;
Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.