diff --git a/content/en/functions/collections/Sort.md b/content/en/functions/collections/Sort.md index 6b9ea2c34..5625c894e 100644 --- a/content/en/functions/collections/Sort.md +++ b/content/en/functions/collections/Sort.md @@ -105,6 +105,40 @@ This produces: Victor Marius Jean ``` +### First level key removal + +Hugo removes the first level keys when sorting a map. + +Original map: + +```json +{ + "felix": { + "breed": "malicious", + "type": "cat" + }, + "spot": { + "breed": "boxer", + "type": "dog" + } +} +``` + +After sorting: + +```json +[ + { + "breed": "malicious", + "type": "cat" + }, + { + "breed": "boxer", + "type": "dog" + } +] +``` + ## Sort a page collection {{% note %}}