Sorts array values in the specified column, array literal, or function that returns an array in ascending or descending order.

Array literal reference example:


Output: Returns the following array: [D,C,B,A]

Column reference example:


Output: Returns the arrays listed in the myArrays column sorted in ascending order.


ArgumentRequired?Data TypeDescription
array_refYstringName of Array column, Array literal, or function returning an Array to apply to the function
order_enumYstring (enumerated value)

Order is defined as either:

  • ascending (default)
  • descending


Name of the array column, array literal, or function returning an array whose array values you wish to sort.

Required?Data TypeExample Value
YesString (column reference or function) or array literalmyArray1


String literal indicating the order by which the referenced arrays should be sorted:

Usage Notes:

Data Type
Example Value
NoString (enumerated value)descending

Example - Student progress across tests