This page explains how to use the array_sort_asc function in APL.
array_sort_asc
function to return a new array that contains all the elements of the input array, sorted in ascending order. This function is useful when you want to normalize the order of array elements for comparison, presentation, or further processing—such as identifying patterns, comparing sequences, or selecting boundary values.
You can apply array_sort_asc
to arrays of numbers, strings, or dynamic objects, making it useful across many telemetry, logging, and security data scenarios.
Splunk SPL users
mvsort
, which sorts multivalue fields in ascending order. In APL, array_sort_asc
provides similar functionality but works on dynamic arrays and returns a new sorted array.ANSI SQL users
UNNEST
and sort the results using ORDER BY
. In APL, you can sort arrays inline using array_sort_asc
, which is more concise and expressive.Name | Type | Required | Description |
---|---|---|---|
array | dynamic | ✔️ | An array of values to sort. Can be numbers, strings, or other primitives. |