Also to note, after you have eval 'ed it, you can then access the data in this manner as per your data structure : data[0].id, so on
Thanks & Regards, Dhruva Sagar. Joan Crawford<http://www.brainyquote.com/quotes/authors/j/joan_crawford.html> - "I, Joan Crawford, I believe in the dollar. Everything I earn, I spend." On Wed, Aug 12, 2009 at 3:27 PM, Mark <johanns.m...@gmail.com> wrote: > > yeah that i was thinking to but the problem is that you get. > > [object Object] > > if you alert out data again. > > On Aug 12, 11:53 am, Dhruva Sagar <dhruva.sa...@gmail.com> wrote: > > 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 >