jmespath / jmespath.site

The repo for the jmespath.org website.
http://jmespath.org/
Apache License 2.0
56 stars 51 forks source link

Need the ability to unique a list #51

Open DanielFTwum opened 6 years ago

DanielFTwum commented 6 years ago

Need the ability to get a unique list of elements in an array (similar to UNIX uniq)

Say I have an array { "result": [ "G", "L", "G", "G", "L" ] }

uniq(result) yields [ "G", "L" ]

maxxyme commented 6 years ago

I honestly think it can't be done right now with JMESPath. Just try the last tip here (new Set() from ES2015): https://www.jstips.co/en/javascript/deduplicate-an-array/

abeelan commented 2 years ago

This document is intended to help you, jmespath.py

CustomFunctions