Skip to content

Table.orderBy()

Christopher Hunt edited this page Jul 17, 2016 · 8 revisions

Return a collection of all items in table ordered by given index.

Syntax

table.orderBy(index)

Parameters

index: String The primary key or index to use for sorting. The special string ":id" will always order by the primary key.

Return Value

Collection

Remarks

Returns an unfiltered collection sorted by the index or primary key given by index. Note that index can only be an indexed property or the primary key. If you want to sort by an un-indexed property, then use Collection.sortBy() instead.

Sample

See the sample in Table.offset().

See Also

Collection.sortBy()

Clone this wiki locally