.uniq()
A function that deduplicates elements from an array, while preserving the order of the remaining elements.
Syntax
#fs.scripts.lib().uniq(array);
Parameters
array
The array to be deduplicated.
Return
Returns an array.
Example
function(context, args) {
const l = #fs.scripts.lib();
const my_array = ["apples", "bananas", "oranges", "apples", "limes", "oranges"];
return l.uniq(my_array);
}