Carrot reference
Methods

.unique()

Description

This method returns unique elements from a list.

Syntax

list.unique()

  • Returns a List of the elements in the list, filtered down to only its unique elements.

list.unique{expression}

  • Returns a List of the elements in the list with the given expression applied to each element, and then filtered down to be unique. Functionally equivalent to: list.map{expression}.unique()

Sample usage

  • underJobs.unique{department} - Returns the unique set of departments that the current job manages



Updated 02 Dec 2024
Doc contributor
Doc contributor
Did this page help you?