0

How can I do this? Here's what I have:

function send(input):void{
   // input.text = "{key: 'value'}"
   var x:* = stringToObject(input.text)

   // then be able to do this
   var y:* = x.key;

   // then y must be equal to 'value'
   trace(y) // this is just a string
}

1 Answer 1

2

You'll need to include the JSON library to be able to parse JSON strings into objects.

Reference the as3corelib library for more info.

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

Comments

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.