Login
Community
DARK THEME

How to sort List by object attribute ?

I have a list of objects and I want to sort it by Y coordinate to map it properly on the screen.

Any suggestion on how I can do this?

This is the way:

my_list.sortList( function( a, b ) return a.Y - b.Y end )

Thanks, works charmingly!

Wonder if we can do the same magic but instead of sorting, we do filtering?

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community