I think this is what you are looking for data = eval ( '(' + data + ')' );
Thanks & Regards, Dhruva Sagar. Jonathan Swift<http://www.brainyquote.com/quotes/authors/j/jonathan_swift.html> - "May you live every day of your life." On Wed, Aug 12, 2009 at 3:18 PM, Mark <johanns.m...@gmail.com> wrote: > > Hi all. > I got an php page who picks up data out of my data base and puts it in > a multidimensinal array. That array is being encoded to Json > > $event = json_encode($super_array); > > Then i made an javasript get funtion to get that array to my main > page. > > function get(){ > $.get("../position of my file/test.php", function(data){ > alert (""+data); > }); > > The var data doesn't give me an array it gives me an object while i > programmed it to give me an array (inplace of force_object): > > {"5": > > {"id":"5","title":"test","start_datum":"6161616","end_datum":"663461","afspraak_type":"memo"},"10": > > {"id":"10","title":"bla","start_datum":"4819028","end_datum":"8230948","afspraak_type":"verjaardag"}} > > What i need to have is that it gives me an array that looks something > like this: > > [ > { > id:5, > title:test, > start_datum:6161616, > end_datum: 663461, > afspraak_type: Memo > } > { > id:10, > title:bla, > start_datum: 4819028, > end_datum:8230948, > afspraak_type:Verjaardag > } > ] > What is the best way to get to this? > > Mark > >