apoc.convert.toSet

Function

apoc.convert.toSet(list LIST<ANY>) - converts the given value into a set represented in Cypher as a LIST<ANY>.

Signature

apoc.convert.toSet(list :: ANY) :: LIST<ANY>

Input parameters

Name Type Default

list

ANY

null

Usage examples

Convert list to set
RETURN apoc.convert.toSet([1,2,3,2]) AS output;
Table 1. Results
Output

[1, 2, 3]