Ned help String contain Object

Hi guys…reaally need help on this silly question I guess…but I’ve been wrap my head and hour try to figure out what exactly wrong…here’s the scenario…I have this code


var params:Object = { image:bitmap, message:'Message', fileName:'file-name', detail:'[{tag_uid:"12345678","x":"0","y":"0"},{tag_uid:"001111","x":"0","y":"0"}]' };

as you can see in detail I just statically put the value the code is executing OK but when i Build the value on run time dynamically using below code it’s seem the code not executing so what my problem…really need help…



var arrUserID:Array = new Array({USERID:"2323232"},{USERID:"111111"});

var len:Number = arrUserID.length;

var targz:String = "";

            targz = '[';
            for(var i:Number=0;i<len;i++){
                if(i == (len-1)){
                    targz += '{tag_uid:"'+arrUserID*.IDUSER+'",x:"'+Math.round(Math.random()*imgHolder.width)+'",y:"'+Math.round(Math.random()*imgHolder.height)+'"}';
                }else{
                    targz += '{tag_uid:"'+arrUserID*.IDUSER+'",x:"'+Math.round(Math.random()*imgHolder.width)+'",y:"'+Math.round(Math.random()*imgHolder.height)+'"},';
                }
            }
            targz += ']';


var params:Object = { image:bitmap, message:'Message', fileName:'file-name', **detail:targz** }; **--> as you can see here**


so the code not executeing and trun to be Fail result…so hope someone will shed me on light …maybe got somthign to do with the String…

Any help are appreciated…Tq in advanced