I currently have an array of objects structured as follows:
entries: [
{
id:1,
text: "Lorem ipsum",
timeStamp:"Thu, 01 Jun 2018"
},
{
id:3,
text:"Lorem ipsum",
timeStamp:"Thu, 24 May 2018"
},
{
id:4,
text: "Lorem ipsum",
timeStamp:"Thu, 24 May 2018"
}
]
My goal is to organize these objects into an 'archive' array that looks like this:
archive: [
{
monthyear: May 2018,
entries: 2
},
{
monthyear: June 2018,
entries: 5
}
]
I'm seeking advice on which array functions would be best suited to achieve this desired outcome.