Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Sorting Ise

$
0
0

Hello All,

 

I need some help in Sorting.

 

Actually in my scenario, I want to sort one json array.

 

ex:

 

var json = [{

 

"name" : "AllanJos",

"Age"   : 2,

"DOJ'  : 21-9-08

 

},

{

 

"name" : "BllanHos",

"Age"   : 21,

"DOJ'  : 21-9-89

 

},

 

{

 

"name" : "ZllanIos",

"Age"   : 22,

"DOJ'  : 21-9-87

 

}

];

 

 

1. I want to sort this json array by using: sap.ui.model.Sorter

2. I need to sort all the property in this json,( when I selected the property from list)

 

json.sort(new sap.ui.model.Sorter("Age",false);    I tried this but it is not sorting ...


Could you please help!!!



Thanks,

Karthik A


Viewing all articles
Browse latest Browse all 6178

Trending Articles