Table.orderBy()

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()

Table of Contents