I have an array of objects like below:
[{
"id": 1,
"Size": 90,
"Maturity": 24,
},
{
"id": 2,
"Size": 85,
"Maturity": 22,
},
{
"id": 3,
"Size": 80,
"Maturity": 20,
}]
I need to this Array on basis of different property value sorting (eg: Maturity) and also add a column order which has the ascending order/rank. Eg:
[{
"id": 1,
"Size": 90,
"Maturity": 22,
"Order": 2
},
{
"id": 2,
"Size": 85,
"Maturity": 25,
"Order": 3
},
{
"id": 3,
"Size": 80,
"Maturity": 20,
"Order": 1
}]