apoc.coll.fill

Details

Syntax

apoc.coll.fill(item, count)

Description

Returns a LIST<ANY> with the given count of items.

Arguments

Name

Type

Description

item

STRING

The item to be present in the returned list.

count

INTEGER

The number of times the given item should appear in the returned list.

Returns

LIST<ANY>

Usage examples

The following returns a list containing 2 lists with the contents abc:

RETURN apoc.coll.fill('abc', 2) as output;
Results
Output

["abc", "abc"]