Home     ReadMe   Plans You need to log in --> login

Array Key Sort

Given an array of JSON objects, returns an array of the items sorted by key

Arguments:
- "json_array" (text)
- "key" (string - key to sort on)
- "reverse" (bool - True for descending sorting, False for ascending - default is ascending)

Returns:
JSON array, eg given [{"a":"v", "b":43},{"a":"g", "b":33},{"a":"f", "b":56}] sorted on "b" returns [{"a":"g","b":33},{"a":"v","b":43},{"a":"f","b":56}]

NB: Don't forget to set your headers and use POST (not GET) for the arguments !!!

Try it out

headers:
POST url:
json_array:
key:
reverse:
You are not logged in
output: