Array Sort
Sort Array Endpoint
The Sort Array endpoint allows you to sort an array of numbers either in ascending or descending order. You can specify the sort order by passing the sort
query parameter with values of high
or low
.
Endpoint
URL: https://api.erensko.xyz/v1/sort-array
Method: POST
Description: Sorts an array of numbers based on the specified sort order. You can choose to sort the array in descending (high
) or ascending (low
) order.
URL Parameters
sort
The order in which your array should be sorted. high
Sorts the array in descending order (from highest to lowest). low
Sorts the array in ascending order (from lowest to highest).
Body
array
The array of numbers you would to sort.
Headers
Authorization
Request Example
Response Example
For ?sort=high
(descending order):
For ?sort=low
(ascending order):
Last updated