Converting String to Object

I’m using TweenLite for my Tweens. The constructor takes the form TweenLite(targetDisplayObject, duration, object). The third parameter specifies the parameters of the tween, in the form {x:100,y:100,ease:Back.easeIn} etc. What I want to do is this:


var str:String = "{x:100,y:100,rotation:Math.random()*360}";
var obj:Object = convertToObject(str);
var tween:TweenLite = new TweenLite(mc,2,obj);

Any suggestions or solutions for a convertToObject function? I need to be able to have math functions (+,-,*,/,Math.random(), etc).