How to Sort a Collection(API data)?
So, I have something like this:
versionList = Collection();
for each item in searchUrl.getJson("results")
{
year= item.getJson("year");
label= item.getJson("label");
catalog= item.getJson("catalog");
versionList.insert(year + label + catalog);
}
The only way I currently know how to sort this would be versionList.sort(true); One problem is this doesn't seem to sort numbers numerically - it treats 904 as a bigger number than 1004.
I might want to display year first in my data, but sort by catalog.
How might that be done?
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Orchestly Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.