0

I have the following JSON string:

"["Dog","Cat","Mouse","Monkey","Horse"]"

I want to create a string array in ActionScript from this. Is this possible in AS3?

2 Answers 2

2

JSON.parse() converts from JSON to AS3, and JSON.stringify() does the opposite.

Sign up to request clarification or add additional context in comments.

Comments

-1

You can use a JSON parser like as3corelib to extract the data.

example:

var results:Array = JSON.decode(urlloader.data).result;

for each(var youritem:Object in results) {
    trace(youritem.codeD);
}

Download as3corelib

2 Comments

There is a native support for JSON in Actionscript for quite a long time. No need to use 3rd party libs
Unless you're targeting Flash Player version < 11

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.