apoc.convert.toSet

Details

Syntax

apoc.convert.toSet(list)

Description

Converts the given value into a set represented in Cypher as a LIST<ANY>.

Arguments

Name

Type

Description

list

ANY

The list to convert into a set.

Returns

LIST<ANY>

Usage examples

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

[1, 2, 3]