jmespath.site
jmespath.site copied to clipboard
Need the ability to unique a list
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" ]
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/