Discuz! Board

 

 

Search
Discuz! Board Forum Integration Questions sort array
View: 436|Reply: 1
go

sort array

Rank: 3Rank: 3

Post on 2011-7-22 16:54 |All posts
In the Papaya sdk there is a functionality to sort an array of basic data types using the arrayName.sort() function. I have an array of objects and I need to sort based on one of the fields of the objects. I've tried arrayName.sort( fieldName ) or the arrayName.sortOn( fieldName ) function available in as3. Neither one works. I was wondering if there was any way, besides writing a custom function, that I could sort my array of objects.

Rank: 4

Post on 2011-7-22 16:55 |All posts
right, we don't support arrayName.sort( fieldName ). We cannot refer to a field using a String of the field name.

We will look into it
Security Q&A Change Security code Change

Archiver|Comsenz Inc.

All time is GMT+8, 2013-5-22 09:51 , Processed in 0.078147 second(s), 10 queries .

Powered by Discuz! X1.5

© 2001-2010 Comsenz Inc.