I have huge a list of object & I want to sort it's by date, considering my list is :
List a = [
{
'id':1,
'name':"abc",
'date': 1467849600000
}
{
'id':2,
'name':"xyz",
'date': 1459468800000
}
{
'id':3,
'name':"klm",
'date': 1460246400000
}];
This List contains 3 Object having random dates in Long Format
- date of 1st object is 7th July 2016
- date of 2nd object is 1st April 2016
- date of 3rd object is 10th April 2016
I want to sort list such that it should give me output like this :
List a = [
{
'id':2,
'name':"xyz",
'date': 1459468800000
}
{
'id':3,
'name':"klm",
'date': 1460246400000
}
{
'id':1,
'name':"abc",
'date': 1467849600000
}
];
All the solutions are welcomed, Thanks in Advance.