# Neo4j export whole database to ARRAY\_JSON

**URL:** <https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902>\
**Category:** Import / Export\
**Tags:** apoc, export, json\
**Created:** [March 26, 2021, 8:25am UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902 "2021-03-26T08:25:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amirkanan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/amirkanan/32/17452_2.png) [@amirkanan](https://community.neo4j.com/u/amirkanan)\
**Post date:** [March 26, 2021, 8:25am UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902/1 "2021-03-26T08:25:16Z")

</div>

I tried to use an APOC procedure from [here](https://neo4j.com/labs/apoc/4.1/overview/apoc.export/apoc.export.json.all/) to export the DB using the following:

`CALL apoc.export.json.all("all.json",{useTypes:true})`

I can successfuly export to JSONL. However, I am not able to change the JSON format to other available formats such as JSON\_LINES, ARRAY\_JSON, JSON or JSON\_ID\_AS\_KEYS. According to the documentation the following should work but it does not:

```auto
CALL apoc.export.json.all("all.json",{config:{jsonFormat:'ARRAY_JSON'}})

```

The result of above procedure is in JSONL but not ARRAY\_JSON.  
Cheers, A

---

<div class="post-metadata">

**Author:** ![tard\_gabriel](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tard_gabriel/32/28033_2.png) [@tard\_gabriel](https://community.neo4j.com/u/tard_gabriel)\
**Post date:** [March 27, 2021, 6:12am UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902/2 "2021-03-27T06:12:53Z")

</div>

They fixed it in the new apoc release but for now directly enter the jsonFormat parameter in the bracelet without the config:{}

---

<div class="post-metadata">

**Author:** ![amirkanan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/amirkanan/32/17452_2.png) [@amirkanan](https://community.neo4j.com/u/amirkanan)\
**Post date:** [March 27, 2021, 8:32am UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902/3 "2021-03-27T08:32:28Z")

</div>

I have tried that (simillar to yours) but did not work.

Many thanks  
A

---

<div class="post-metadata">

**Author:** ![tard\_gabriel](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tard_gabriel/32/28033_2.png) [@tard\_gabriel](https://community.neo4j.com/u/tard_gabriel)\
**Post date:** [March 27, 2021, 4:30pm UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902/4 "2021-03-27T16:30:16Z")

</div>

Weird it worked for me, might the way you return your result too.  
For me, even with the JSON\_ARRAY format it wasn't what i needed for keylines so I just did it manually with a bunch of map and collect.

What's your version of APOC? You can open the plugin folder using the tree dots by the blue open button and chose Open Folder -\> Plugins. Copy and paste the path showed into your file manager if it doesn't open.

In the plugin folder, you can see your APOC version on the apoc file name.

---

<div class="post-metadata">

**Author:** ![amirkanan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/amirkanan/32/17452_2.png) [@amirkanan](https://community.neo4j.com/u/amirkanan)\
**Post date:** [March 28, 2021, 12:14am UTC](https://community.neo4j.com/t/neo4j-export-whole-database-to-array-json/35902/5 "2021-03-28T00:14:42Z")

</div>

Thanks Gabriel. The problem was the version and it is working now with the latest APOC release from [here](https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases)
