I have an array of objects called objarray . Each object is as follows:
var object = {
age: "45"
coords: "-37.807997 144.705784"
date: Sun Jul 28 2002 00:00:00 GMT+1000 (EST)
}
( date is a Date object)
I need to push each object into a new array based on the date. I want the end result to look like this:
var dateGroups = [[object, object, object],[object, object], [object, object, object]];
Each array in dateGroups contains objects with the same date.
Is this possible with arrays? Earlier, I generated a new object containing all objarray objects grouped by date (dates generated from data):
var alldates = {
"1991" : [object, object, object],
"1992" : [object, object],
}
, : ie dateGroups [0]=
dateGroups? ?