> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function get_sorted_tuples

Module: `noir_aztec::protocol::utils::arrays`

```rust
pub unconstrained fn get_sorted_tuples<T, let N: u32, Env>(
    array: [T; N],
    ordering: fn[Env](T, T) -> bool,
) -> [SortedTuple<T>; N]
where
    T: Eq
```

Sorts the input `array`, but also outputs an `original_index` field for each sorted item, so that you know where it came from.
