Update uniq function example (#1963)

This commit is contained in:
Joe Mooring 2023-01-30 11:50:25 -08:00 committed by GitHub
parent 686a65cf69
commit 6cc9ebdfd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,24 +2,17 @@
title: uniq
linktitle: uniq
description: Takes in a slice or array and returns a slice with duplicate elements removed.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
menu:
docs:
parent: "functions"
parent: functions
keywords: [multilingual,i18n,urls]
signature: ["uniq SET"]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
signature: [uniq SET]
aliases: []
---
```
{{ uniq (slice 1 2 3 2) }}
{{ slice 1 2 3 2 | uniq }}
<!-- both return [1 2 3] -->
{{ slice 1 3 2 1 | uniq }} --> [1 3 2]
```