Friday, June 24, 2016
Sorting on JSON
Hi ,
JSON is the handy object for JS.
To sort in JSN
var nItems = {
nid: item.ParentLink,
nName: item.Title,
cid: item.Id,
URL: item.URL,
DO: item.DisplyOrder
}
var deskItem = $.trim(item.Title).toUpperCase();
ParentNodes.push(nItems);
ParentNodes.sort(function(a, b){
return a.DO - b.DO;
});
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment