description: Sorts maps, arrays, and slices and returns a sorted slice.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
menu:
docs:
parent: "functions"
keywords: [ordering,sorting,lists]
signature: []
workson: [lists,taxonomies,terms,groups]
hugoversion:
relatedfuncs: []
deprecated: false
aliases: []
---
A sorted array of map values will be returned with the keys eliminated. There are two optional arguments: `sortByField` and `sortAsc`. If left blank, sort will sort by keys (for maps) in ascending order as its default behavior.