Contents

QuerySort

A sort directive in a query request, specifying a field and direction.

Declaration

object QuerySort

Properties

NameTypeDescription
fieldstring

The name of the field to sort on (for example, id, name).

orderQuerySortOrder

The sort direction for the specified field. Valid values: ASC, DESC.

Discussion

The QuerySort defines one sort directive in a QueryRequest.sorting array. The query applies multiple QuerySort entries in order: the first entry is the primary sort, subsequent entries are tiebreakers.

Example

{
  "field": "name",
  "order": "ASC"
}

See Also

Query Objects