apoc.coll.unionAll

Details

Syntax

apoc.coll.unionAll(list1, list2)

Description

Returns the full union of the two given LIST<ANY> values (duplicates included).

Arguments

Name

Type

Description

list1

LIST<ANY>

The list of values to compare against list2 and form a union from.

list2

LIST<ANY>

The list of values to compare against list1 and form a union from.

Returns

LIST<ANY>

Usage examples

The following creates the full union of two lists:

RETURN apoc.coll.unionAll([1,2,3,4,5], [3,4,5,6,7]) AS output;
Results
Output

[1, 2, 3, 4, 5, 3, 4, 5, 6, 7]