Hi

I was trying iterate a set of array of object to another format
below mentioned is an array of objects im having.

Code:
[{"id":1,"date":"2010-10-07","starttime":"10:30","endtime":"11:30"},{"id":2,"date":"2010-10-08","starttime":"11:30","endtime":"12:30"},{"id":3,"date":"2010-10-07","starttime":"9:30","endtime":"10:30"},{"id":4,"date":"2010-10-08","starttime":"11:30","endtime":"12:30"},{"id":5,"date":"2010-10-07","starttime":"14:30","endtime":"16:30"},{"id":6,"date":"2010-10-08","starttime":"13:30","endtime":"14:30"}]

I was trying to accomplish something like this.

Code:
[
{2010-10-07 : [{1,3,5}]},
{2010-10-08 :[{2,4,6}]}
]
Could anyone look into this and provide me some help.