<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "CouchDBClient",
  "identifier" : "/documentation/CouchDBClient/MangoSortField",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "CouchDBClient"
    ],
    "preciseIdentifier" : "s:13CouchDBClient14MangoSortFieldV"
  },
  "title" : "MangoSortField"
}
-->

# MangoSortField

A struct representing a sort field and direction for Mango queries.

```
struct MangoSortField
```

## Overview

Use `MangoSortField` to specify the field and sort direction (ascending or descending)
when constructing a MangoQuery. This enables type-safe and self-documenting sort definitions.

Example:

```swift
let sortField = MangoSortField(field: "name", direction: .asc)
let query = MangoQuery(
    selector: ["type": .string("user")],
    sort: [sortField]
)
```