Questions about exporting graphs to JSON

Hello everyone, I am very happy to be here. Today is my first day in the neo4j community.I would like to ask you a question that has been bothering me for a long time.

I'm trying to export the graph to JSON format.
The results of using APOC to export the graph to JSON are as follows:
CALL apoc.export.json.all("xxx.json", {})
{"type":"node","id":"567","labels":["Node"],"properties":{"name":"两姐妹"}}
{"type":"node","id":"572","labels":["Node"],"properties":{"name":"村委会"}}
{"type":"node","id":"573","labels":["Node"],"properties":{"name":"行窃"}}
{"type":"node","id":"576","labels":["Node"],"properties":{"name":"轿车"}}
{"type":"node","id":"577","labels":["Node"],"properties":{"name":"大米"}}
{"type":"node","id":"585","labels":["Node"],"properties":{"name":"课堂"}}
{"id":"0","type":"relationship","label":"开","start":{"id":"329","labels":["Node"]},"end":{"id":"316","labels":["Node"]}}
{"id":"61","type":"relationship","label":"讲授","start":{"id":"585","labels":["Node"]},"end":{"id":"180","labels":["Node"]}}
{"id":"62","type":"relationship","label":"起诉","start":{"id":"313","labels":["Node"]},"end":{"id":"572","labels":["Node"]}}
{"id":"63","type":"relationship","label":"上捅伤","start":{"id":"573","labels":["Node"]},"end":{"id":"515","labels":["Node"]}}
{"id":"72","type":"relationship","label":"游客","start":{"id":"123","labels":["Node"]},"end":{"id":"566","labels":["Node"]}}
{"id":"87","type":"relationship","label":"牵","start":{"id":"567","labels":["Node"]},"end":{"id":"517","labels":["Node"]}}
{"id":"88","type":"relationship","label":"自认为","start":{"id":"518","labels":["Node"]},"end":{"id":"319","labels":["Node"]}}

The results of exporting using "Export JSON" on the browser side are as follows:
[
{
"p": {
"start": {
"identity": 585,
"labels": [
"Node"
],
"properties": {
"name": "课堂"
}
},
"end": {
"identity": 180,
"labels": [
"Node"
],
"properties": {
"name": "知识"
}
},
"segments": [
{
"start": {
"identity": 585,
"labels": [
"Node"
],
"properties": {
"name": "课堂"
}
},
"relationship": {
"identity": 61,
"start": 585,
"end": 180,
"type": "讲授",

It can be seen that the results of the two methods are different in format. What should I do if I need the second format now?

In addition, I found that when using "MATCH p=()-->() RETURN p" to query in Neo4j, the data in "Table" is similar to the second format. If there is no way to directly get the data in the second format, How do I get the data in this "Table" so that I can use it after processing it.

thank you very much(^_^)