apoc.load.jsonArray

Procedure APOC Core

apoc.load.jsonArray('url') YIELD value - load array from JSON URL (e.g. web-api) to import JSON as stream of values

Signature

apoc.load.jsonArray(url :: STRING?, path =  :: STRING?) :: (value :: ANY?)

Input parameters

Name Type Default

url

STRING?

null

path

STRING?

Output parameters

Name Type

value

ANY?

Usage Examples

map.json contains a JSON document representing a person and their children.

map.json
{
  "foo":[1,2,3]
}

We’ll place this file into the import directory of our Neo4j instance. Let’s now write a query using the apoc.load.jsonArray procedure to explore this file.

The following query processes map.json and returns the content as Cypher data structures

CALL apoc.load.jsonArray("file:///map.json", "$.foo");
Table 1. Results
value

[1, 2, 3]